diff --git a/en-US/Design.xml b/en-US/Design.xml index 8d9963c..d355102 100644 --- a/en-US/Design.xml +++ b/en-US/Design.xml @@ -392,6 +392,11 @@
Documenting Multiple or Long Commands + + + The following guidance differs from previous guidance on the subject. + + Sometimes you need to show how to use long commands that extend over two or more lines, or that include several commands in a single example. If the commands are relatively short and straightforward, then include the commands on consecutive lines. @@ -404,11 +409,12 @@ $ vi myFile.txt - - If the commands are long, complex, or wrap over multiple lines, then the following design options are available. + + If the commands are long, complex, or wrap over multiple lines, then use the following design: + - + Use line continuation characters without the associated PS2 prompts. - + You can also indent the second and subsequent lines of such commands to assist in clarity and readability if required. - You can use this option for any of these designs. + -Wrapping Long Commands with Continuation Characters and PS2 Prompts + - + -# tar --selinux -czvf config_files.tar.gz /etc/katello \ +# tar --selinux -czvf config_files.tar.gz /etc/katello \ > /etc/elasticsearch /etc/candlepin /etc/pulp /etc/gofer \ > /etc/grinder /etc/pki/katello /etc/pki/pulp /etc/qpidd.conf \ > /etc/sysconfig/katello /etc/sysconfig/elasticsearch \ -> /root/ssl–build /var/www/html/pub/* /var/lib/katello - +> /root/ssl-build /var/www/html/pub/* /var/lib/katello + Wrapping Long Commands Without Continuation Characters or PS2 Prompts This example uses neither continuation characters nor PS2 prompts, but it does show how to use line indentation to help to clarify long commands. -# cd /var/lib/katello +# cd /var/lib/katello -# myCommand --option funky --color=true - --config_file=/home/user/config.conf - --output_file=/home/user/output.txt +# myCommand --option funky --color=true + --config_file=/home/user/config.conf + --output_file=/home/user/output.txt - + --> Wrapping Long Commands with Continuation Characters and Without PS2 Prompts This example uses continuation characters but not PS2 prompts. - + [root@node]# cephadm bootstrap --mon-ip=MON_IP --registry-url=registry.redhat.io \ --registry-username=REGISTRY_USERNAME --registry-password=REGISTRY_PASSWORD \ --initial-dashboard-password=DASHBOARD_PASSWORD --dashboard-password-noupdate \