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 30706
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Filename generation: instruct zsh not to follow symbolic links?
- Date: Thu, 16 Jul 2026 02:57:46 +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:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=HO+/uvR8pAkYlCZBDeDQL8yCpcxnDfgre4DDMUNEwkk=; fh=yk3c4scJWo86Za4IR1HBNZw2a+GkUkfVQ7Fs3jnanfg=; b=PvpCt4ZCnQTgsvsBH++KTILmgC/VdQ6op/LYntF07LvszVgbhLIHP5l4jVzChIjJZR w2bNUiLGB2Na6B1CyLf3n8zSLT+SRUczgDrWEz/uHyRvugfzJzdGWlDDacYedH+Y5Z1T u8gPhRcFoz+BIldclIfz62juAS9exnrVWf+5/TivAdfoZk5L+2mRf9AbjzbZGslkFL0r zaSQpq9xYcwenSqhSs4Q/VHKBibAp3xPVZX1oEnW02cF10x1SCsSpDGnoAUWOI2FG7d2 Dxk0u/JenSsXouvays2oXt0Z2YcSm3pqpkVWTTWLlc5PdSsGr1B2dQOVWs3cSHQ1iQIN n+nw==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1784163479; cv=none; d=google.com; s=arc-20260327; b=BzGTZ528d0VRuJ3D4B3fubvB0NCw9lNC2V0z8qfv8rzGhBtVrLMKw79391jCcZ5S6r 1zEPJI/O9dChxiuXGzJYYLJXa7zkDx6RT9PfBcL1PfVJQ0Il8bcY0OH1Rq7gr02UNvpd Sp4WhwXwZUEMinTvmCfD2vzUKqbgK9r7zH6DUFqIUPCa4vRhuNr+40FJ7RJIgVgGwyVS ZI1Y3R6pgeDnQJrwnnLmdSDg3Nt+UILlrM9yaeyAGmWB544NbJfEEswEkij32uXvZCLV s3DhLIySlU9lgRvu5FcRByUWqTGKHNnpXGFAukKPLVEpJzTWz8nG3LzwV3F/qhAwmNkw EFug==
- Archived-at: <https://zsh.org/users/30706>
- In-reply-to: <20260715231750.GB75013@qaa.vinc17.org>
- List-id: <zsh-users.zsh.org>
- References: <20260715231750.GB75013@qaa.vinc17.org>
On Thu, Jul 16, 2026 at 1:47 AM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
>
> In filename generation, is there a way to instruct zsh not to follow
> symbolic links?
>
> Unfortunately, it is not possible to use glob qualifiers on
> pathname components (except the last one, i.e. ending the pattern),
> e.g. *(/)/foo, even though there would be no ambiguity in parsing
> (because a slash cannot appear in a pathname component).
No, but you can do things like
() { mycmd $^@/foo } *(/)
which conveniently doesn't need any named temporary parameters.
fwiw, this is perfectly valid:
bing/(bar/)#foo
so the parsing might be less easy than you think. (Unless you were
thinking about looking for the )/ sequence? Maybe that would work, but
who can say for sure). I'm not exactly sure what you mean by "because
a slash cannot appear in a pathname component", are you referring to
the / inside the (/) or the one after? Because obviously all other
glob qualifiers are not the '/' character.
Also, you can already do this:
*(#q/)/foo
but the / still will not apply to the * instead of the foo (and in
fact does not apply to the foo either, not sure if it's intended to?).
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author