diff options
Diffstat (limited to 'completions/pkg_delete')
-rw-r--r-- | completions/pkg_delete | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/completions/pkg_delete b/completions/pkg_delete index 2abb671..aecc8e8 100644 --- a/completions/pkg_delete +++ b/completions/pkg_delete @@ -1,18 +1,19 @@ # bash completion for *BSD package management tools -*- shell-script -*- -_pkg_delete() +_comp_cmd_pkg_delete() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return local pkgdir=${PKG_DBDIR:-/var/db/pkg}/ [[ $prev == -o || $prev == -p || $prev == -W ]] && return - COMPREPLY=($(compgen -d -- "$pkgdir$cur")) - ((${#COMPREPLY[@]} == 0)) || COMPREPLY=(${COMPREPLY[@]#$pkgdir}) + _comp_compgen -c "$pkgdir$cur" -- -d + ((${#COMPREPLY[@]} == 0)) || COMPREPLY=("${COMPREPLY[@]#"$pkgdir"}") } && - complete -F _pkg_delete -o dirnames pkg_delete pkg_info pkg_deinstall + complete -F _comp_cmd_pkg_delete -o dirnames \ + pkg_delete pkg_info pkg_deinstall # ex: filetype=sh |