diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2012-02-18 10:12:02 +0200 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2012-02-18 10:12:02 +0200 |
commit | e4fe946621d824fe04f5c8a8f4f774342b53df40 (patch) | |
tree | cd17b48942beaaef5e124032b666ba93624e40a5 | |
parent | f41d7e2ff660fdf9a95490d4fb438eefa565e9d1 (diff) | |
download | bash-completion-e4fe946621d824fe04f5c8a8f4f774342b53df40.tar.gz |
su: Fix long option handling.
-rw-r--r-- | completions/su | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/completions/su b/completions/su index df912306..2c6254d3 100644 --- a/completions/su +++ b/completions/su @@ -7,8 +7,8 @@ fi _su() # linux-specific completion { - local cur prev words cword - _init_completion || return + local cur prev words cword split + _init_completion -s || return case "$prev" in -s|--shell) @@ -23,6 +23,8 @@ _su() # linux-specific completion ;; esac + $split && return + if [[ "$cur" == -* ]]; then COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' -- "$cur" ) ) [[ $COMPREPLY == *= ]] && compopt -o nospace |