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

Symlinks in recursive glob



Hi all,

is there a way to not dereference symlinks in a recursive glob?

Long story:
I want to search upwards for a file like
`print (../)#.shorten_folder_marker(:a:h)`, but that dereferences symlinks.
If I remove the :a modifier I get a relative path, which I cannot use as
well. The use case is that I want to truncate the folder to the point where
the .shorten_folder_marker exists. This may be a symlinked directory.
e.g. I have /tmp/test/1/2/3 and /tmp is a symlink to /private/tmp.

Both chasedots and chaselinks are turned off.

I've seen solutions to this with either using find or traversing the path
up manually.. Both solutions seem cumbersome to me.

Thanks,
Dominik


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