summaryrefslogtreecommitdiff
path: root/completions/pkgtool
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2011-10-15 10:18:43 +0300
committerVille Skyttä <ville.skytta@iki.fi>2011-10-15 10:18:43 +0300
commitefad9540e531bd3f662a99241545a4fedcd86d18 (patch)
treef4eb4e2aff28f62344ceecc7844225c8eb73da8e /completions/pkgtool
parent449c71fa747390535c76c6a71e4b9ee81aab347e (diff)
downloadbash-completion-efad9540e531bd3f662a99241545a4fedcd86d18.tar.gz
Do rest of splits, add symlinking for files defining multiple completions.
Diffstat (limited to 'completions/pkgtool')
-rw-r--r--completions/pkgtool42
1 files changed, 42 insertions, 0 deletions
diff --git a/completions/pkgtool b/completions/pkgtool
new file mode 100644
index 00000000..d9e5815a
--- /dev/null
+++ b/completions/pkgtool
@@ -0,0 +1,42 @@
+# Slackware Linux pkgtool completion
+
+_pkgtool()
+{
+ local cur prev words cword
+ _init_completion || return
+
+ case "$prev" in
+ --source_dir|--target_dir)
+ _filedir -d
+ return 0
+ ;;
+ --sets)
+ # argument required but no completions available
+ return 0
+ ;;
+ --source_device)
+ COMPREPLY=( $( compgen -f -d -- "${cur:-/dev/}" ) )
+ return 0
+ ;;
+ --tagfile)
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--sets --ignore-tagfiles --tagfile \
+ --source-mounted --source_dir --target_dir --source_device' \
+ -- "$cur" ) )
+ return 0
+ fi
+} &&
+complete -F _pkgtool pkgtool
+
+# Local variables:
+# mode: shell-script
+# sh-basic-offset: 4
+# sh-indent-comment: t
+# indent-tabs-mode: nil
+# End:
+# ex: ts=4 sw=4 et filetype=sh