Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Silly question on :h and = expansion
- X-seq: zsh-users 26939
- From: "Paul" <GammaFunction@xxxxxxxxxxx>
- To: "Zach Riggle" <zachriggle@xxxxxxxxx>, "Zsh Users" <zsh-users@xxxxxxx>
- Subject: Re: Silly question on :h and = expansion
- Date: Tue, 17 Aug 2021 16:31:42 -0500
- Archived-at: <https://zsh.org/users/26939>
- Dkim-filter: OpenDKIM Filter v2.11.0 smtp.vivaldi.net 76230BD02B
- Dkim-filter: OpenDKIM Filter v2.11.0 smtp.vivaldi.net B9920BD068
- In-reply-to: <CAMP9c5m8cBSfzSBgDEvadZFOKNMd7sE-qXFrjCxFKXYj6SDxrQ@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
On Tue Aug 17, 2021 at 12:39 PM CDT, Zach Riggle wrote:
> Quick question, the answer is probably "just use dirname".
>
> But I was hoping there was a way to combine the "=" and ":h" expansion
> into one line. As best I can tell, there isn't -- but I figured it
> was worth asking.
In fact there is! Modifiers can also be used as globbing flags:
cd =foo(:h)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author