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

Re: Silly question on :h and = expansion



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