From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [PATCH] Set TMPSUFFIX=.zsh in edit-command-line
Date: Mon, 31 May 2021 15:54:46 -0700 [thread overview]
Message-ID: <CAH+w=7a8cVP4Kp5CAZ8P5bRmxv3HpXn_mP=L74g2_FZEjEjwqQ@mail.gmail.com> (raw)
In-Reply-To: <20210529114108.GA25290@tarpaulin.shahaf.local2>
On Sat, May 29, 2021 at 4:41 AM Daniel Shahaf <d.s@daniel.shahaf.name> 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?
next prev parent reply other threads:[~2021-05-31 22:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-28 13:35 Akinori MUSHA
2021-05-29 11:41 ` Daniel Shahaf
2021-05-31 22:54 ` Bart Schaefer [this message]
2021-06-02 3:27 ` Akinori MUSHA
2021-06-03 7:51 ` Oliver Kiddle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH+w=7a8cVP4Kp5CAZ8P5bRmxv3HpXn_mP=L74g2_FZEjEjwqQ@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).