diff options
author | Matthew Martin <phy1729@gmail.com> | 2015-11-22 19:57:51 -0800 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2015-11-22 19:57:51 -0800 |
commit | 6fe05eac841bcbc0c92e97987904a60a66e63a1d (patch) | |
tree | 9233750482995458cdfa6cb3db8c23399f711a05 | |
parent | 14487ff5cc0233acf4ed3398559d975e92d52d51 (diff) | |
download | zsh-6fe05eac841bcbc0c92e97987904a60a66e63a1d.tar.gz zsh-6fe05eac841bcbc0c92e97987904a60a66e63a1d.tar.xz zsh-6fe05eac841bcbc0c92e97987904a60a66e63a1d.zip |
37201: change quoting to handle group names with spaces
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Completion/Unix/Type/_groups | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 9c4118171..824052c96 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2015-11-22 Barton E. Schaefer <schaefer@zsh.org> + * Matthew Martin: 37201: Completion/Unix/Type/_groups: change + quoting to handle group names with spaces + +2015-11-22 Barton E. Schaefer <schaefer@zsh.org> + * 37192: Functions/Prompts/prompt_adam1_setup, Functions/Prompts/prompt_adam2_setup, Functions/Prompts/prompt_bart_setup, diff --git a/Completion/Unix/Type/_groups b/Completion/Unix/Type/_groups index a5624269e..c5e5aaf83 100644 --- a/Completion/Unix/Type/_groups +++ b/Completion/Unix/Type/_groups @@ -13,9 +13,9 @@ if ! zstyle -a ":completion:${curcontext}:" groups groups; then : ${(A)_cache_groups:=${${(M)${(f)"$(_call_program groups dscacheutil -q group)"}:#name*}##*: }} fi elif (( ${+commands[getent]} )); then - : ${(A)_cache_groups:=${${(s: :)$(_call_program groups getent group 2>/dev/null)}%%:*}} + : ${(A)_cache_groups:=${${(f)"$(_call_program groups getent group 2>/dev/null)"}%%:*}} else - : ${(A)_cache_groups:=${${${(s: :)$(</etc/group)}%%:*}:#+}} + : ${(A)_cache_groups:=${${${(f)"$(</etc/group)"}%%:*}:#+}} if (( ${+commands[ypcat]} )) && tmp=$(_call_program groups ypcat group.byname 2>/dev/null); then _cache_groups+=( ${${(f)tmp}%%:*} ) # If you use YP |