mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 13:33:52 +01:00
keep globbing quiet in _path_files; check if group/user exists in _chown (17393)
This commit is contained in:
parent
1a1b108b34
commit
f5c8907ec5
@ -1,3 +1,9 @@
|
||||
2002-07-02 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* 17393: Completion/Unix/Command/_chown,
|
||||
Completion/Unix/Type/_path_files: keep globbing quiet in
|
||||
_path_files; check if group/user exists in _chown
|
||||
|
||||
2002-07-01 Clint Adams <clint@zsh.org>
|
||||
|
||||
* 17391: Completion/Debian/Command/_dpkg: complete files after
|
||||
|
@ -1,6 +1,6 @@
|
||||
#compdef chown chgrp
|
||||
|
||||
local suf usr grp req expl line
|
||||
local suf usr grp req line
|
||||
|
||||
line=( "${(@)words[2,CURRENT-1]:#-*}" )
|
||||
|
||||
@ -33,6 +33,9 @@ else
|
||||
req=( ${usr:+\^u$usr} ${grp:+\^g$grp} )
|
||||
(( EUID )) && req=( u$EUID$^req )
|
||||
req=( -$^req )
|
||||
req="*(${(j:,:)req})"
|
||||
|
||||
_wanted files expl file _files -g "*(${(j:,:)req})" && return 0
|
||||
( : $~req ) 2> /dev/null || req='*'
|
||||
|
||||
_files -g "$req" && return 0
|
||||
fi
|
||||
|
@ -338,7 +338,7 @@ for prepath in "$prepaths[@]"; do
|
||||
else
|
||||
compfiles -p$cfopt tmp1 accex "$skipped" "$_matcher $matcher[2]" '' fake "$pats[@]"
|
||||
fi
|
||||
tmp1=( $~tmp1 )
|
||||
tmp1=( $~tmp1 ) 2> /dev/null
|
||||
|
||||
if [[ -n "$PREFIX$SUFFIX" ]]; then
|
||||
# See which of them match what's on the line.
|
||||
|
Loading…
Reference in New Issue
Block a user