diff options
| author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2002-07-02 14:06:44 +0000 |
|---|---|---|
| committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2002-07-02 14:06:44 +0000 |
| commit | f5c8907ec58c21dcf59b01c45716ca780697861f (patch) | |
| tree | eb4d11828ece98487828b73c8933d39c1e10fb30 /Completion/Unix/Command/_chown | |
| parent | 17390: new zle parameters $PREDISPLAY, $POSTDISPLAY (diff) | |
| download | zsh-f5c8907ec58c21dcf59b01c45716ca780697861f.tar zsh-f5c8907ec58c21dcf59b01c45716ca780697861f.tar.gz zsh-f5c8907ec58c21dcf59b01c45716ca780697861f.tar.bz2 zsh-f5c8907ec58c21dcf59b01c45716ca780697861f.tar.lz zsh-f5c8907ec58c21dcf59b01c45716ca780697861f.tar.xz zsh-f5c8907ec58c21dcf59b01c45716ca780697861f.tar.zst zsh-f5c8907ec58c21dcf59b01c45716ca780697861f.zip | |
keep globbing quiet in _path_files; check if group/user exists in _chown (17393)
Diffstat (limited to 'Completion/Unix/Command/_chown')
| -rw-r--r-- | Completion/Unix/Command/_chown | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_chown b/Completion/Unix/Command/_chown index 599e09d14..e194677d2 100644 --- a/Completion/Unix/Command/_chown +++ b/Completion/Unix/Command/_chown @@ -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 |
