]> git.tuebingen.mpg.de Git - gsu.git/blobdiff - subcommand
subcommand: Properly escape example lines in maindoc.
[gsu.git] / subcommand
index 5e55580013dad9ec224e8c11a8e191b18c00428e..415a4f08d9b4ea6bcb957cb868771dac1dcbab03 100644 (file)
@@ -96,7 +96,8 @@ gsu_check_arg_count()
 #      [[ -n "$o_c" ]] && echo "The -c option was given with arg $o_c"
 gsu_getopts()
 {
-       local i c tab=' ' cr='
+       local -i i
+       local c c1 c2 tab='     ' cr='
 '
 
        gsu_check_arg_count $# 1 1
@@ -237,7 +238,7 @@ com_prefs()
                (($? != 0)) && return
                ret=-$E_GSU_EDITOR
                result="${EDITOR:-vi}"
-               "$result" "$conf"
+               "$result" $conf
                (($? != 0)) && return
                ret=$GSU_SUCCESS
                return
@@ -374,7 +375,7 @@ _gsu_roffify_maindoc()
                fi
                if [[ "${line:0:1}" == "$TAB" ]]; then # example
                        _gsu_change_roffify_state 'state' 'example'
-                       printf '%s\n' "$line"
+                       _gsu_print_protected_roff_line "$line"
                        line="$next_line"
                        continue
                fi
@@ -881,6 +882,6 @@ gsu()
        ret=-$E_GSU_BAD_COMMAND
        result="$arg"
        gsu_err_msg
-       _gsu_print_available_commands
+       _gsu_print_available_commands 1>&2
        exit 1
 }