#21400 closed enhancement (fixed)

alignment/blocking? - BLFS 12.3

Reported by: rhubarbpieguy Owned by: blfs-book
Priority: normal Milestone: 12.4
Component: BOOK Version: git
Severity: medium Keywords:
Cc:

Description

I’m uncertain if two-line options qualify for \ alignment. But as the following lines are similar in length I’ll flag them and let others make the decision.

 
 general/genlib/libstatgrab.xml
	 ./configure --prefix=/usr   \
	             --disable-static \

 general/sysutils/mc.xml
	 ./configure --prefix=/usr \
	             --sysconfdir=/etc \

 general/prog/slang.xml
	 ./configure --prefix=/usr \
	             --sysconfdir=/etc \

 gnome/platform/gnome-menus.xml
	 ./configure --prefix=/usr \
	             --sysconfdir=/etc \

  multimedia/libdriv/libdv.xml
	 ./configure --prefix=/usr \
	             --disable-xv \

 multimedia/libdriv/x264.xml
	 ./configure --prefix=/usr \
	             --enable-shared \

  xfce/core/thunar.xml
	 ./configure --prefix=/usr \
	             --sysconfdir=/etc \

 xfce/core/xfce4-session.xml
	 ./configure --prefix=/usr \
	             --sysconfdir=/etc \

 

Change History (3)

comment:1 by thomas, 18 months ago

All of the command in the list above ends with a \ at the second option. This means that it is continued.

For example, thunar's command is

./configure --prefix=/usr \
            --sysconfdir=/etc \
            --docdir=/usr/share/doc/thunar-4.20.2

So its a three-line command. I've not checked the others.

Anyway, why not folding the options? It is IMHO better to read, its consistent to many-options-commands and does not harm when copy&paste. What i would ask is whether the \ in many-options-commands must be aligned as for example in apache's command:

./configure --enable-authnz-fcgi                              \
            --enable-layout=BLFS                              \
            --enable-mods-shared="all cgi"                    \
            --enable-mpms-shared=all                          \
            --enable-suexec=shared                            \
            --with-apr=/usr/bin/apr-1-config                  \
            --with-apr-util=/usr/bin/apu-1-config             \
            --with-suexec-bin=/usr/lib/httpd/suexec           \
            --with-suexec-caller=apache                       \
            --with-suexec-docroot=/srv/www                    \
            --with-suexec-logfile=/var/log/httpd/suexec.log   \
            --with-suexec-uidmin=100                          \
            --with-suexec-userdir=public_html                 &&

But this is also marginal - it is better to focus on the command itself than on formatting it.

comment:2 by Bruce Dubbs, 18 months ago

The first importance is, of course, the command itself. However aligning the backslashes draws the eye such that it emphasizes that the entire block is one logical line. It also looks, IMO, more professional.

comment:3 by Bruce Dubbs, 18 months ago

Resolution: → fixed
Status: new → closed

I fixed these and apache. It only took a few minutes. The problem is that in the xml ww have something like:

<screen><userinput>./configure --prefix=/usr       \
            --sysconfdir=/etc   \

To get the alignment right generally means that we need to move the configure line down, check/adjust alignment, and move the configure line back up.

Also there is sometimes an issue when some lines are very long and others short. Then it becomes a judgement issue about how to do the alignment. We really don't want a whole lot so white space between the text and the backslash. It helps to try to keep the long lines at the end like:

./configure --enable-authnz-fcgi                    \
            --enable-layout=BLFS                    \
            --enable-mods-shared="all cgi"          \
            --enable-mpms-shared=all                \
            --enable-suexec=shared                  \
            --with-apr=/usr/bin/apr-1-config        \
            --with-apr-util=/usr/bin/apu-1-config   \
            --with-suexec-bin=/usr/lib/httpd/suexec \
            --with-suexec-caller=apache             \
            --with-suexec-docroot=/srv/www          \
            --with-suexec-uidmin=100                \
            --with-suexec-userdir=public_html       \
            --with-suexec-logfile=/var/log/httpd/suexec.log &&
Note: See TracTickets for help on using tickets.