diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2011-10-15 10:18:43 +0300 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-10-15 10:18:43 +0300 |
commit | efad9540e531bd3f662a99241545a4fedcd86d18 (patch) | |
tree | f4eb4e2aff28f62344ceecc7844225c8eb73da8e /completions/pkgtool | |
parent | 449c71fa747390535c76c6a71e4b9ee81aab347e (diff) | |
download | bash-completion-efad9540e531bd3f662a99241545a4fedcd86d18.tar.gz |
Do rest of splits, add symlinking for files defining multiple completions.
Diffstat (limited to 'completions/pkgtool')
-rw-r--r-- | completions/pkgtool | 42 |
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 |