diff options
author | Dan McGee <dan@archlinux.org> | 2010-06-24 15:32:33 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-06-24 15:32:33 +0200 |
commit | 630e7508ee44f2c41ba3f5d17c0c9ac15b15af3b (patch) | |
tree | 3b043d1a1d22e527e112c40a7d11130ef69f5727 /contrib | |
parent | 71330a431040377ae9a37989fcfd43cee7596194 (diff) | |
parent | 6f4f9c1b66ed859b3679d70e15c003ab4907b823 (diff) | |
download | pacman-630e7508ee44f2c41ba3f5d17c0c9ac15b15af3b.tar.gz pacman-630e7508ee44f2c41ba3f5d17c0c9ac15b15af3b.tar.xz |
Merge branch 'maint'
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/bash_completion | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/contrib/bash_completion b/contrib/bash_completion index 2713ba4d..1ec2cd53 100644 --- a/contrib/bash_completion +++ b/contrib/bash_completion @@ -52,10 +52,6 @@ _pacman_pkg() { )" } -_pacman_file() { - compopt -o filenames; _filedir 'pkg.tar.*' -} - _pacman() { local common core cur database prev query remove sync upgrade o COMPREPLY=() @@ -102,7 +98,18 @@ _pacman() { true } +if [[ $(type -t compopt) = "builtin" ]]; then + _pacman_file() { + compopt -o filenames; _filedir 'pkg.tar.*' + } + complete -F _pacman -o default pacman +else + _pacman_file() { + _filedir 'pkg.tar.*' + } + complete -F _pacman -o filenames -o default pacman +fi + complete -F _makepkg -o default makepkg -complete -F _pacman -o default pacman # ex:et ts=2 sw=2 ft=sh |