]> git.tue.mpg.de Git - gsu.git/commitdiff
subcommand: Do not duplicate options to com_prefs().
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 5 Mar 2017 21:57:10 +0000 (22:57 +0100)
committerAndre Noll <maan@tuebingen.mpg.de>
Sat, 15 Apr 2017 15:45:21 +0000 (17:45 +0200)
subcommand

index a9d388ba05232f49ac5f8adf37fd9f0df1a2ca45..343f248ea45a07411fa61a576532b5566a2bf9b1 100644 (file)
@@ -93,6 +93,8 @@ gsu_complete_options()
        done
 }
 
+com_prefs_options='e'
+
 export gsu_prefs_txt="
 Print the current preferences.
 
@@ -107,7 +109,7 @@ com_prefs()
 {
        local i conf="${gsu_config_file:=${HOME:-}/.$gsu_name.rc}"
 
-       gsu_getopts "e"
+       gsu_getopts "$com_prefs_options"
        eval "$result"
        (($ret < 0)) && return
        gsu_check_arg_count $# 0 0
@@ -153,7 +155,7 @@ com_prefs()
 
 complete_prefs()
 {
-       gsu_complete_options "e" "$@"
+       gsu_complete_options "$com_prefs_options" "$@"
 }
 
 export gsu_man_txt="