bash-completion: Don't offer short options where corresponding long one exists.
Users who know the short options can just hit the short option instead of tab, and it's not likely that it would be helpful to present a list of single character options to users who don't know them, doing so just unnecessarily trashes the list of suggestions. Signed-off-by: Ville Skyttä <ville.skytta@iki.fi>
This commit is contained in:
parent
58c41e15b3
commit
0d5b9b8ab1
74 changed files with 461 additions and 462 deletions
|
@ -23,18 +23,17 @@ _su_module()
|
|||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS=" -
|
||||
-u --user
|
||||
-m -p --preserve-environment
|
||||
-g --group
|
||||
-G --supp-group
|
||||
-l --login
|
||||
-c --command
|
||||
OPTS=" --user
|
||||
--preserve-environment
|
||||
--group
|
||||
--supp-group
|
||||
--login
|
||||
--command
|
||||
--session-command
|
||||
-f --fast
|
||||
-s --shell
|
||||
-h --help
|
||||
-V --version"
|
||||
--fast
|
||||
--shell
|
||||
--help
|
||||
--version"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue