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 48975
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] Set TMPSUFFIX=.zsh in edit-command-line
- Date: Mon, 31 May 2021 15:54:46 -0700
- Archived-at: <https://zsh.org/workers/48975>
- In-reply-to: <20210529114108.GA25290@tarpaulin.shahaf.local2>
- List-id: <zsh-workers.zsh.org>
- References: <92d2b09c-9559-7085-a521-29714e38f02c@iDaemons.org> <20210529114108.GA25290@tarpaulin.shahaf.local2>
On Sat, May 29, 2021 at 4:41 AM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> 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
>
> The patch looks good to me, but I haven't time to review or
> test it properly, so I'll defer to others on that.
Unless there's an internal bug with TMPSUFFIX, I can only think of one
way this patch could go wrong, and it's pretty obscure:
Suppose I have a "smart editor" that attempts to decide what program
to run based on file extension (opens .xls as a spreadsheet, .doc with
a word processor, etc.) Suppose further that this "editor" opens
files ending in ".perl", ".zsh", ".sh", etc. by running the
corresponding interpreter. Oops, I've just executed the command line
I meant to edit.
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?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author