xzdec: Complete $cur == -* after option argument and split checks.
This commit is contained in:
parent
e5592133a3
commit
33900b8724
@ -61,12 +61,6 @@ _xzdec()
|
||||
local cur prev words cword split
|
||||
_init_completion -s || return
|
||||
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
|
||||
[[ $COMPREPLY == *= ]] && compopt -o nospace
|
||||
return 0
|
||||
fi
|
||||
|
||||
case $prev in
|
||||
-M|--memory)
|
||||
# argument required but no completions available
|
||||
@ -80,6 +74,12 @@ _xzdec()
|
||||
|
||||
$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
|
||||
} &&
|
||||
complete -F _xzdec xzdec
|
||||
|
Loading…
x
Reference in New Issue
Block a user