Cleanup _pkgtool()
This commit is contained in:
parent
4ebdc48bc3
commit
ee78227c9c
@ -14,9 +14,6 @@ _pkgtool()
|
|||||||
|
|
||||||
local prev=${COMP_WORDS[COMP_CWORD-1]}
|
local prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
|
|
||||||
local split=false
|
|
||||||
_split_longopt && split=true
|
|
||||||
|
|
||||||
case $prev in
|
case $prev in
|
||||||
--source_dir|--target_dir)
|
--source_dir|--target_dir)
|
||||||
_filedir -d
|
_filedir -d
|
||||||
@ -30,15 +27,15 @@ _pkgtool()
|
|||||||
COMPREPLY=( $( compgen -f -d -- "${cur:-/dev/}" ) )
|
COMPREPLY=( $( compgen -f -d -- "${cur:-/dev/}" ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
|
--tagfile)
|
||||||
|
_filedir
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
$split && return 0
|
return 0
|
||||||
|
|
||||||
local IFS=$'\t\n'
|
|
||||||
COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \
|
|
||||||
$( compgen -d -- "$cur" ) )
|
|
||||||
} &&
|
} &&
|
||||||
complete -F _pkgtool -o filenames pkgtool
|
complete -F _pkgtool pkgtool
|
||||||
|
|
||||||
have removepkg && [ -f /etc/slackware-version ] &&
|
have removepkg && [ -f /etc/slackware-version ] &&
|
||||||
_removepkg()
|
_removepkg()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user