xzdec: Complete $cur == -* after option argument and split checks.

This commit is contained in:
Ville Skyttä 2011-05-03 12:41:28 +03:00
parent e5592133a3
commit 33900b8724

View File

@ -61,12 +61,6 @@ _xzdec()
local cur prev words cword split local cur prev words cword split
_init_completion -s || return _init_completion -s || return
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
return 0
fi
case $prev in case $prev in
-M|--memory) -M|--memory)
# argument required but no completions available # argument required but no completions available
@ -80,6 +74,12 @@ _xzdec()
$split && return 0 $split && return 0
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
return 0
fi
_filedir xz # no lzma support here as of xz 4.999.9beta _filedir xz # no lzma support here as of xz 4.999.9beta
} && } &&
complete -F _xzdec xzdec complete -F _xzdec xzdec