index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Eli Schwartz <eschwartz@archlinux.org> | 2019-06-25 17:20:06 -0400 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2019-06-26 10:15:47 +1000 |
commit | cd475331f4dd0b464ecb281714134ca76e57b39d (patch) | |
tree | de17d8ba36eeb16bb4c346326cff0918ad953730 | |
parent | d917109432665a6c7ca903fa727cf9a0dc9c7a0c (diff) |
-rw-r--r-- | scripts/completion/bash_completion.in | 6 |
diff --git a/scripts/completion/bash_completion.in b/scripts/completion/bash_completion.in index a1ab9fec..915004e2 100644 --- a/scripts/completion/bash_completion.in +++ b/scripts/completion/bash_completion.in @@ -24,7 +24,7 @@ _arch_ptr2comp() { } _arch_incomp() { - local r="\s-(-${1#* }\s|\w*${1% *})"; [[ $COMP_LINE =~ $r ]] + local r="[[:space:]]-(-${1#* }[[:space:]]|[[:alnum:]_]*${1% *})"; [[ $COMP_LINE =~ $r ]] } _pacman_keyids() { @@ -77,7 +77,7 @@ _makepkg() { _init_completion || return if [[ $prev = @(-p|--config) ]]; then compopt -o default - elif [[ ! $prev =~ ^-(-(config|help|key|version)$|\w*[Vh]) ]]; then + elif [[ ! $prev =~ ^-(-(config|help|key|version)$|[[:alnum:]_]*[Vh]) ]]; then opts=('allsource asdeps check clean cleanbuild config force geninteg help holdver ignorearch install key log needed noarchive nobuild nocheck nocolor noconfirm nodeps noextract noprepare noprogressbar nosign @@ -127,7 +127,7 @@ _pacman() { if [[ $? != 0 ]]; then _arch_ptr2comp core - elif [[ ! $prev =~ ^-\w*[Vbhr] && + elif [[ ! $prev =~ ^-[[:alnum:]_]*[Vbhr] && ! $prev = --@(cachedir|color|config|dbpath|help|hookdir|gpgdir|logfile|root|version) ]] then [[ $cur = -* ]] && _arch_ptr2comp ${o#* } common || |