From: Andre Noll Date: Tue, 2 Mar 2010 14:56:50 +0000 (+0100) Subject: gsu: Print help text on prefs command. X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=8f3d6787f5d7caf3ea6f7a01ea44dd7308f005c8;p=gsu.git gsu: Print help text on prefs command. This uses another nice bashism I recently learned. --- diff --git a/funcs/gsu b/funcs/gsu index 043676c..add1be4 100644 --- a/funcs/gsu +++ b/funcs/gsu @@ -163,6 +163,7 @@ com_prefs() printf " [$default_value]" fi echo + [[ -n "$help_text" ]] && sed -e '/^[ ]*$/d; s/^[ ]*/# /g' <<< "$help_text" printf "$name=$val" [[ "$val" == "$default_value" ]] && printf " # default" echo