summaryrefslogtreecommitdiff
path: root/completions/removepkg
diff options
context:
space:
mode:
Diffstat (limited to 'completions/removepkg')
-rw-r--r--completions/removepkg19
1 files changed, 19 insertions, 0 deletions
diff --git a/completions/removepkg b/completions/removepkg
new file mode 100644
index 00000000..5b3d8273
--- /dev/null
+++ b/completions/removepkg
@@ -0,0 +1,19 @@
+# Slackware Linux removepkg completion -*- shell-script -*-
+
+_removepkg()
+{
+ local cur prev words cword
+ _init_completion || return
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-copy -keep -preserve -warn' \
+ -- "$cur" ) )
+ return 0
+ fi
+
+ local root=${ROOT:-/}
+ COMPREPLY=( $( cd "$root/var/log/packages" 2> /dev/null || return 1 ; \
+ compgen -f -- "$cur" ) )
+} &&
+complete -F _removepkg removepkg
+
+# ex: ts=4 sw=4 et filetype=sh