Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Filename generation: instruct zsh not to follow symbolic links?



% nosym() { [[ $REPLY == $REPLY:A ]] || reply=() }
% echo /tmp/foo/f/*
/tmp/foo/f/bang
% echo /tmp/foo/f/*(+nosym)
zsh: no matches found: /tmp/foo/f/*(+nosym)
% ls -ld /tmp/foo/*
drwxrwxr-x  3 schaefer  wheel  96 Jul 16 11:55 /tmp/foo/bar
lrwxrwxr-x  1 schaefer  wheel  12 Jul 16 11:55 /tmp/foo/f -> /tmp/foo/bar
% ls -ld /tmp/foo/*(+nosym)
drwxrwxr-x  3 schaefer  wheel  96 Jul 16 11:55 /tmp/foo/bar

(This specific example can be a little surprising on MacOS because
/tmp is itself a symlink to /private/tmp)




Messages sorted by: Reverse Date, Date, Thread, Author