houaq / shflags

Automatically exported from code.google.com/p/shflags
0 stars 0 forks source link

support for newline in the FLAGS_HELP #31

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It would be very useful to have an option to provide newline in string of the 
FLAGS_HELP (custom usage description) variable.

So that something to following:
FLAGS_HELP="Some usage text\nnew line of the text\nUSAGE: $0 [flags]"

would output:
Some usage text
new line of the text
USAGE: $0 [flags]

Original issue reported on code.google.com by butko...@gmail.com on 10 Jul 2013 at 9:29

GoogleCodeExporter commented 9 years ago
OK, found a workaround (http://arstechnica.com/civis/viewtopic.php?p=21091503).

Example :

FLAGS_HELP=$(cat <<EOF
`basename $0`

Some additional desc

USAGE: `basename $0` [flags]
EOF
)

Anyway, should be probalby documented in the wiki.

Original comment by butko...@gmail.com on 11 Jul 2013 at 5:55