From: Akinori MUSHA <knu@iDaemons.org>
To: schaefer@brasslantern.com, zsh-workers@zsh.org
Subject: Re: [PATCH] Set TMPSUFFIX=.zsh in edit-command-line
Date: Wed, 2 Jun 2021 12:27:23 +0900 [thread overview]
Message-ID: <4c036f13-8e41-e7a0-1a02-5591e6f14ade@iDaemons.org> (raw)
In-Reply-To: <CAH+w=7a8cVP4Kp5CAZ8P5bRmxv3HpXn_mP=L74g2_FZEjEjwqQ@mail.gmail.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 1118 bytes --]
On 2021/06/01 7:54, Bart Schaefer wrote:
> 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:
Thanks for the consideration.
> 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?
At least it does not reproduce on my Mac, where Xcode is opened for
editing the script. On Ubuntu Desktop, .zsh is associated with gedit
by default. If one dares to change that to make double-clicking in
general unsafe and then set EDITOR to open/start as well, I say they are
shooting their own foot.
--
Akinori MUSHA /https://akinori.org/
[-- Attachment #1.1.2: Type: text/html, Size: 1880 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 203 bytes --]
next prev parent reply other threads:[~2021-06-02 3:27 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
2021-06-02 3:27 ` Akinori MUSHA [this message]
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=4c036f13-8e41-e7a0-1a02-5591e6f14ade@iDaemons.org \
--to=knu@idaemons.org \
--cc=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).