Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [RFC][PATCH] Add change-directory() widget function
- X-seq: zsh-workers 48645
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>, Marlon Richert <marlon.richert@xxxxxxxxx>
- Subject: Re: [RFC][PATCH] Add change-directory() widget function
- Date: Wed, 21 Apr 2021 13:29:44 -0700
- Archived-at: <https://zsh.org/workers/48645>
- In-reply-to: <20210421201139.GD21343@tarpaulin.shahaf.local2>
- List-id: <zsh-workers.zsh.org>
- References: <95CDA630-4EE5-4003-8D9C-CCCB9A47F109@gmail.com> <CAH+w=7bpkYktd4UN5DtUS45MMNdWYr7c-OG7DHOX21QXG4LMUA@mail.gmail.com> <4D587C0C-EB5F-4A58-A0AE-D45E43F432CD@gmail.com> <20210420221429.GF1035@tarpaulin.shahaf.local2> <CAH+w=7Z7-WLjZgTk1XQrddJPen3bJJ4LU0-Vs5nTmwC8n+sWFQ@mail.gmail.com> <20210421201139.GD21343@tarpaulin.shahaf.local2>
On Wed, Apr 21, 2021 at 1:12 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
>
> Bart Schaefer wrote on Tue, Apr 20, 2021 at 20:18:24 -0700:
> > On Tue, Apr 20, 2021 at 3:14 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> > >
> > > Should any of the words be quoted to protect against global aliases?
> >
> > This is generally speaking a fruitless task.
>
> How so? «PM_UNALIASED» turns «noaliases» on for the duration of parsing
> the function itself, not for the duration of parsing the code which the
> function dumps into $BUFFER when executed.
Ah, I misunderstood the scope of "any of the words".
I'm of two minds on this one. Totally agree regarding e.g. "builtin
cd". OTOH if for some reason I have a global alias for "+1" or "-0" I
might actually want it expanded here (I'm having a hard time
visualizing a use case for such an alias in the first place).
Marlon's latest effort to generalize this as "execute-command" pushes
responsibility for all of the foregoing onto the caller.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author