[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-43-g42b107b
David Paleino
dapal at debian.org
Sun Mar 27 10:40:55 UTC 2011
The following commit has been merged in the master branch:
commit 42b107bcfcb8ce7c9deb9bc449574accabddff5f
Author: David Paleino <dapal at debian.org>
Date: Sun Mar 27 12:40:44 2011 +0200
Fix broken _allowed_groups usage (shadow and coreutils)
diff --git a/CHANGES b/CHANGES
index a9cc476..4044b6f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -13,6 +13,7 @@ bash-completion (2.x)
[ David Paleino ]
* If _filedir 'ext' returns nothing, just fallback to generic
file completion. Patch by Clint Byrum (Debian: #619014, LP: #533985)
+ * Fix broken _allowed_groups usage (shadow and coreutils)
[ Freddy Vulto ]
* Improve __reassemble_comp_words_by_ref() to not create words of
diff --git a/completions/coreutils b/completions/coreutils
index 0e0b759..490eaf9 100644
--- a/completions/coreutils
+++ b/completions/coreutils
@@ -84,7 +84,7 @@ _chgrp()
# first parameter on line or first since an option?
if [[ $COMP_CWORD -eq 1 && "$cur" != -* || "$prev" == -* ]]; then
- _allowed_groups
+ _allowed_groups "$cur"
else
_filedir || return 0
fi
diff --git a/completions/shadow b/completions/shadow
index 6aea045..868cea3 100644
--- a/completions/shadow
+++ b/completions/shadow
@@ -317,10 +317,12 @@ have newgrp &&
_newgrp()
{
COMPREPLY=()
- if [[ "`_get_cword`" == "-" ]]; then
+ _get_comp_words_by_ref cur
+
+ if [[ "$cur" == "-" ]]; then
COMPREPLY=( - )
else
- _allowed_groups
+ _allowed_groups "$cur"
fi
} &&
complete -F _newgrp newgrp
--
bash-completion
More information about the Bash-completion-commits
mailing list