From 6fe05eac841bcbc0c92e97987904a60a66e63a1d Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Sun, 22 Nov 2015 19:57:51 -0800 Subject: 37201: change quoting to handle group names with spaces --- ChangeLog | 5 +++++ 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,3 +1,8 @@ +2015-11-22 Barton E. Schaefer + + * Matthew Martin: 37201: Completion/Unix/Type/_groups: change + quoting to handle group names with spaces + 2015-11-22 Barton E. Schaefer * 37192: Functions/Prompts/prompt_adam1_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: :)$(/dev/null); then _cache_groups+=( ${${(f)tmp}%%:*} ) # If you use YP -- cgit 1.4.1