mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-11-01 18:30:55 +01:00
37201: change quoting to handle group names with spaces
This commit is contained in:
parent
14487ff5cc
commit
6fe05eac84
2 changed files with 7 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue