Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Set TMPSUFFIX=.zsh in edit-command-line
- X-seq: zsh-workers 49001
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] Set TMPSUFFIX=.zsh in edit-command-line
- Date: Thu, 03 Jun 2021 09:51:30 +0200
- Archived-at: <https://zsh.org/workers/49001>
- In-reply-to: <CAH+w=7a8cVP4Kp5CAZ8P5bRmxv3HpXn_mP=L74g2_FZEjEjwqQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <92d2b09c-9559-7085-a521-29714e38f02c@iDaemons.org> <20210529114108.GA25290@tarpaulin.shahaf.local2> <CAH+w=7a8cVP4Kp5CAZ8P5bRmxv3HpXn_mP=L74g2_FZEjEjwqQ@mail.gmail.com>
On 31 May, Bart Schaefer wrote:
> > Akinori MUSHA wrote on Fri, May 28, 2021 at 22:35:08 +0900:
> > > This patch makes the name of a temporary file to have a .zsh suffix
> This is not entirely far-fetched, if you're on a Mac and have XCode
> fully installed, "open /tmp/blablah.zsh" may actually run zsh.
>
> Is this worth worrying about?
The command it runs comes from a specific editor zstyle, $VISUAL or
$EDITOR, all of which ought to only ever be set to a text editor. It's
always possible that someone shoots themself in the foot in this manner
and it was worth considering. I'd not worry overly unless such a setup
appears to be default for some OS/distribution.
The function already looks to see if it has vim or emacs. Perhaps it
could check for open/xdg-open. I couldn't find a mention of the editor
style in the documentation but if there, a warning could be attached
there.
Anyway, I have pushed the patch.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author