Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Selectively sorting directory by date in completion
- X-seq: zsh-users 30464
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: André Marçais <andre@xxxxxxxxxxx>
- Cc: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, zsh-users@xxxxxxx
- Subject: Re: Selectively sorting directory by date in completion
- Date: Sun, 22 Mar 2026 19:37:31 +0100
- 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-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=2z8K0ZCc4gWz8JhBK923d/Dld2RytlqTGt1GE2XbgFY=; fh=xPWkTwGsJPKwQGEXtEgPPOkvuug4kGDYfY/tLfNRhQU=; b=j51iNfuH+RlkUFy4nMchgXT0baABd8xL8Exph0Nic7Q4Jmp4v9mi8LfnwfHDbsym6C 7OMZDPoWySiZPwDpXCWnIKdD7aWNZY4rk8dM/orc9d7uTgZDzRQevdj2z2PCu1tcdAk2 o9M3dctar61yslrJglSPSEa6qkGthV4MyJksxoTqfzeA3yZHQT7uO+awnEHWaoqURY5F WeZzYEGncREsh8OHQgqBfLiGnlyijXNsrcb8r6NUj1TOMLwXvW38RFEgiHFAHw+DBdKA IwkV/XLGMCy9CAiuumzafczYc3JR0po8c2SjNg4cNPpgT6drHsMfEEF0rFjhP11RJ/L8 wPuA==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1774204664; cv=none; d=google.com; s=arc-20240605; b=FDO2TWfe+XMfEq8V9bNzRCxlNWlLw7y3sSMmGXhlPyy5+Ec9+z3hbmQMadZOydVggy STdw/g2noK8IIa+0+ws+CJHVjb7SUmNURgwtpBKSIiXvFnTzEzpQU6feUK+Vcf9i8VHa j7sb71pDSfUGkyUTI7/+p4uKl+nlLRQ57PHGW+g54k5+ZeAwVxI4Q7TESi1ZzmUfIxBr b/WAMKhFJra2t/2hhDpYApyUHrnZub3PVGlnOwwuz7kNt/dkOUe85Vpp9sENd7ajafc+ Qxm47sIEACYarcfQzqOPWMCDLZahvK5EtsRZgNy+4uwgfLRqgsOspKKvJ5eDxSfiThlW dNtQ==
- Archived-at: <https://zsh.org/users/30464>
- In-reply-to: <DH98IRN62NVP.1468G521T0UUC@marcais.net>
- List-id: <zsh-users.zsh.org>
- References: <DH8UZQ4YFIC1.3I46LXJG3V9QL@marcais.net> <CAHYJk3SjtoiCWycWB5EEQHkggZwY-9mNT7TuepdZL4NTjaLMqQ@mail.gmail.com> <CAH+w=7ZQ=JLn=9LL+m5sbRt2ZitcQLTBS+nHETnaRHqbg5qvXQ@mail.gmail.com> <DH98IRN62NVP.1468G521T0UUC@marcais.net>
On Sun, Mar 22, 2026 at 11:20 AM André Marçais <andre@xxxxxxxxxxx> wrote:
>
> On Sun Mar 22, 2026 at 5:26 AM CET, Bart Schaefer wrote:
> >> You might be able to make good use of zstyle -e here, where the value
> >> of the style will be evaluated [...]
> >
> > zstyle -e ':completion:*' file-sort \
> > '[[ ${${~PREFIX:-$PWD}:a} = (/tmp|$HOME/(dl|tmp)) ]] && \
> > reply=(date)'
>
> Hey, thanks to both of you. I missed the `zstyle -e` option. That's
> pretty clean.
>
> >> [...] $REPLY will be used as the style value
> >
> > It's got to be the $reply array rather than the $REPLY scalar, I think.
>
> Yeah, according to the manual it's `$reply`. (See zshmodules(1).)
Sorry about that, I was probably thinking of the (e::) glob qualifier
where you can use either.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author