about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2003-10-08 05:39:51 +0000
committerBart Schaefer <barts@users.sourceforge.net>2003-10-08 05:39:51 +0000
commit9d119b990fcb939c121b7bddc4a33fe3cd40c697 (patch)
tree0a56ee8e638d5db38913b11dfdc28c1855618806
parentb385458079bce91d15ccab1615dd593fef2d6064 (diff)
downloadzsh-9d119b990fcb939c121b7bddc4a33fe3cd40c697.tar.gz
zsh-9d119b990fcb939c121b7bddc4a33fe3cd40c697.tar.xz
zsh-9d119b990fcb939c121b7bddc4a33fe3cd40c697.zip
users/6663: fix compaudit testing of symlinks
-rw-r--r--ChangeLog6
-rw-r--r--Completion/compaudit12
2 files changed, 12 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 9e2d08eea..eccbacfa0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-10-07  Bart Schaefer  <schaefer@zsh.org>
+
+	* users/6663: Completion/compaudit: follow symlinks when checking
+	permissions on directories in the fpath; also in case of symlinks,
+	find parent with ${^fpath:h} rather than ${^fpath}/..
+
 2003-09-10  Wayne Davison  <wayned@users.sourceforge.net>
 
 	* users/6529 + unposted: StartupFiles/zshenv: updated the comments
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= ;;