about summary refs log tree commit diff
path: root/Completion/compaudit
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2003-10-27 01:49:29 +0000
committerBart Schaefer <barts@users.sourceforge.net>2003-10-27 01:49:29 +0000
commit7d8715c1d8352b4f1f3530cfe104ec490f9c45d8 (patch)
treea09f43a2b4056ce1d0deb65c003bf93ae79a6357 /Completion/compaudit
parenta7803f9dafcc2745db67bd9580050da79271bab2 (diff)
downloadzsh-7d8715c1d8352b4f1f3530cfe104ec490f9c45d8.tar.gz
zsh-7d8715c1d8352b4f1f3530cfe104ec490f9c45d8.tar.xz
zsh-7d8715c1d8352b4f1f3530cfe104ec490f9c45d8.zip
users/6663: follow symlinks when checking permissions on directories in
the fpath; also in case of symlinks, find parent with ${^fpath:h} rather
than ${^fpath}/..
Diffstat (limited to 'Completion/compaudit')
-rw-r--r--Completion/compaudit12
1 files changed, 6 insertions, 6 deletions
diff --git a/Completion/compaudit b/Completion/compaudit
index ba2d01c23..528334dc0 100644
--- a/Completion/compaudit
+++ b/Completion/compaudit
@@ -102,11 +102,11 @@ done <<(getent group)
 #   (including zwc files)
 
 if [[ $GROUP == $LOGNAME && ( -z $GROUPMEM || $GROUPMEM == $LOGNAME ) ]]; then
-  _i_wdirs=( ${^fpath}(Nf:g+w:^g:${GROUP}:,f:o+w:,^u0u${EUID})
-             ${^fpath}/..(Nf:g+w:^g:${GROUP}:,f:o+w:,^u0u${EUID}) )
+  _i_wdirs=( ${^fpath}(N-f:g+w:^g:${GROUP}:,-f:o+w:,-^u0u${EUID})
+             ${^fpath:h}(N-f:g+w:^g:${GROUP}:,-f:o+w:,-^u0u${EUID}) )
 else
-  _i_wdirs=( ${^fpath}(Nf:g+w:,f:o+w:,^u0u${EUID})
-             ${^fpath}/..(Nf:g+w:,f:o+w:,^u0u${EUID}) )
+  _i_wdirs=( ${^fpath}(N-f:g+w:,-f:o+w:,-^u0u${EUID})
+             ${^fpath:h}(N-f:g+w:,-f:o+w:,-^u0u${EUID}) )
 fi
 
 if [[ -f /etc/debian_version ]]
@@ -115,8 +115,8 @@ _i_ulwdirs=( ${(M)_i_wdirs:#/usr/local/*} )
 _i_wdirs=( ${_i_wdirs:#/usr/local/*} ${^_i_ulwdir}(Nf:g+ws:^g:staff:,f:o+w:,^u0) )
 fi
 
-_i_wdirs=( $_i_wdirs ${^fpath}.zwc^([^_]*|*~)(N^u0u${EUID}) )
-_i_wfiles=( ${^fpath}/^([^_]*|*~)(N^u0u${EUID}) )
+_i_wdirs=( $_i_wdirs ${^fpath}.zwc^([^_]*|*~)(N-^u0u${EUID}) )
+_i_wfiles=( ${^fpath}/^([^_]*|*~)(N-^u0u${EUID}) )
 
 case "${#_i_wdirs}:${#_i_wfiles}" in
 (0:0) _i_q= ;;