Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Filename generation: instruct zsh not to follow symbolic links?
- X-seq: zsh-users 30723
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: zsh-users@xxxxxxx
- Subject: Re: Filename generation: instruct zsh not to follow symbolic links?
- Date: Fri, 17 Jul 2026 19:18:26 +0200
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=yQu0Mi5GJyDRYBeiC0ePB0mN3vhXJcDPIMYgwTMWvAg=; fh=+TuSPwbj9QalXu+b1muxzYqKzd4hj0M3F8uwyM+8d0s=; b=ZiOGXhAvEXDQy2nehAqcUbAPBZ7ocgN4/l6sNw42Y35wvWJjt1g79pZuxQzCrltnPy INhg6pAsFogRwte9V90OzK6kGp2KdNfpzoG+lh36I/Z5QWbeclyuOh3FQCwlj3CBGKh9 Af44pj14A8Ud78EEQowdBUTOjFoYrOQAaOH9Cf+gPKnmE/QuXZyZUTknmxbiDZZM1PzW /nxxXvnUPc3zT5G6t8SIjSmn0r5mu78kD63Wh/Le5O7GS0E6z/wlvh5cSGZZQUxFkibU I64BoFXEGL3uM9ajsF04y5Izv2XM42Ksk4SGOGbzl2MnbLJ9iCh2OfwsnwZhd1XBWpai fa9g==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1784308722; cv=none; d=google.com; s=arc-20260327; b=Y3Un644t6k77hIT/bbFxUNmlA+VGkH8+iT+xJRjx76Izcev2knttDcu6o/wrevVJ/i hTjGmUzxLJ+APZwiKeCDTK7GUBgpsimUhFZk1L7zOTYM0PhB4sKhj7Ocbu6LnMpf8CdS XbJewuWBswROi2t+yGIjC41K9uJFuhd/bxAByYhKX4jSY6nYKY2/JhJ1CPqMTIM88Xzl lKbYFP20l8+12QWiVdcQnVydlGXcND9zX3NRQt95zoW3rws64gJTp3piyWHH4wejs6Bg tdioIj7iXwzcfz1PZSTFV9sPSeWLVphHth6VMiWFlWTawxBhU3PX1DpN+j5bbcOKHUgK qTBQ==
- Archived-at: <https://zsh.org/users/30723>
- In-reply-to: <CAH+w=7bSaxi17Fx93FoMNVLDoOg9Ft36JfwAEjjg4ekKf+Q_+A@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <20260715231750.GB75013@qaa.vinc17.org> <CAHYJk3Trh7f1w41Dg5oWKGYPquFhtq6CDLO9tVJwzBQe2uJqcA@mail.gmail.com> <20260716092312.GA2955@cventin.lip.ens-lyon.fr> <CAHYJk3RjJOFvd9KYsjBgYPbkOsyo4BG30Jsy9uQ2U_-v-3h0UQ@mail.gmail.com> <CAH+w=7YxNdDt6mAcUMc7cfgE0PatVU3vmB6h+_Yu6oSZ3XU5+w@mail.gmail.com> <CAH+w=7YuuknewbozmkV1n9HfbuGC=vm=60998a+dtNfZkx4AKg@mail.gmail.com> <20260716230822.GC229319@qaa.vinc17.org> <20260717094918.GA306538@qaa.vinc17.org> <CAH+w=7bSaxi17Fx93FoMNVLDoOg9Ft36JfwAEjjg4ekKf+Q_+A@mail.gmail.com>
On Fri, Jul 17, 2026 at 6:33 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Fri, Jul 17, 2026 at 3:50 AM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> >
> > But anyway, this doesn't really work: */foo(+nosym) also ignores the
> > cases where "foo" is a symbolic link, while in <dir>/foo, I would want
> > to ignore only the cases where <dir> is a symbolic link.
>
> That's easy:
>
> nosym() { [[ $REPLY:a:h == $REPLY:A:h ]] || typeset -g reply=() }
This might need to be :h:a and :h:A respectively, in case the foo
symlink target has multiple components?
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author