summaryrefslogtreecommitdiff
path: root/completions/removepkg
diff options
context:
space:
mode:
Diffstat (limited to 'completions/removepkg')
-rw-r--r--completions/removepkg13
1 files changed, 6 insertions, 7 deletions
diff --git a/completions/removepkg b/completions/removepkg
index 2fb79869..287952cb 100644
--- a/completions/removepkg
+++ b/completions/removepkg
@@ -4,19 +4,18 @@ _removepkg()
{
local cur prev words cword
_init_completion || return
- if [[ $cur == -* ]]; then
- COMPREPLY=( $( compgen -W '-copy -keep -preserve -warn' \
- -- "$cur" ) )
- return 0
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-copy -keep -preserve -warn' -- "$cur" ) )
+ return
fi
- if [[ $cur == */* ]]; then
+ if [[ "$cur" == */* ]]; then
_filedir
- return 0
+ return
fi
local root=${ROOT:-/}
- COMPREPLY=( $( cd "$root/var/log/packages" 2> /dev/null || return 1 ; \
+ COMPREPLY=( $( cd "$root/var/log/packages" 2> /dev/null || return 1; \
compgen -f -- "$cur" ) )
} &&
complete -F _removepkg removepkg