mirror of
https://github.com/moparisthebest/pacman
synced 2024-12-23 00:08:50 -05:00
bash_completion: remove upstream deprecated functions
Populate $cur and $prev with the new bash-completion 1.2 function, _get_comp_words_by_ref. _get_cword and _get_pword have been deprecated. Signed-off-by: Carlos Diaz <839273@gmail.com>
This commit is contained in:
parent
de5f438aef
commit
f5059038f2
@ -30,8 +30,7 @@ _arch_incomp() {
|
|||||||
_makepkg() {
|
_makepkg() {
|
||||||
local cur opts prev
|
local cur opts prev
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=$(_get_cword)
|
_get_comp_words_by_ref cur prev
|
||||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
||||||
if [[ $cur = -* && ! $prev =~ ^-(-(cleancache|config|help)$|\w*[Chp]) ]]; then
|
if [[ $cur = -* && ! $prev =~ ^-(-(cleancache|config|help)$|\w*[Chp]) ]]; then
|
||||||
opts=('allsource asroot clean cleancache config force geninteg help holdver
|
opts=('allsource asroot clean cleancache config force geninteg help holdver
|
||||||
ignorearch install log nobuild nocolor noconfirm nodeps noextract
|
ignorearch install log nobuild nocolor noconfirm nodeps noextract
|
||||||
@ -55,8 +54,7 @@ _pacman_pkg() {
|
|||||||
_pacman() {
|
_pacman() {
|
||||||
local common core cur database prev query remove sync upgrade o
|
local common core cur database prev query remove sync upgrade o
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=$(_get_cword)
|
_get_comp_words_by_ref cur prev
|
||||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
||||||
database=('asdeps asexplicit')
|
database=('asdeps asexplicit')
|
||||||
query=('changelog check deps explicit file foreign groups info list owns
|
query=('changelog check deps explicit file foreign groups info list owns
|
||||||
search unrequired upgrades' 'c e g i k l m o p s t u')
|
search unrequired upgrades' 'c e g i k l m o p s t u')
|
||||||
|
Loading…
Reference in New Issue
Block a user