From: Andre Noll Date: Sun, 5 Mar 2017 21:57:10 +0000 (+0100) Subject: subcommand: Do not duplicate options to com_prefs(). X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=71610bcb63f7e3d4bf33a8e766cad5d9b8f74acc;p=gsu.git subcommand: Do not duplicate options to com_prefs(). --- diff --git a/subcommand b/subcommand index a9d388b..343f248 100644 --- a/subcommand +++ b/subcommand @@ -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="