From: Aaron Schrab <aaron@schrab.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: [FEATURE][PATCH] Complete local executables with ./ prefix, if prefix-needed is false
Date: Tue, 7 Dec 2021 20:16:27 -0500 [thread overview]
Message-ID: <YbAHa8bRRd/Mgb3B@pug.qqx.org> (raw)
In-Reply-To: <CAH+w=7YC2cQCg2XJKAvpGkhUfuVt_A_oMkB-t9=HAQt-SikFrA@mail.gmail.com>
At 16:50 -0800 07 Dec 2021, Bart Schaefer <schaefer@brasslantern.com> wrote:
>On Tue, Dec 7, 2021 at 4:23 PM Aaron Schrab <aaron@schrab.com> wrote:
>
>>
>> The already existing uses of `prefix-needed` are ones that I don't think
>> setting it to false would cause any serious problems. But for this I
>> think it's fairly dangerous
>>
>
>Hm. I haven't applied the patch to see what effect it has, but it appears
>it would cause the "./" to be prefixed onto the command word? If so,
>there's visible feedback; if not, the danger would be of invoking a command
>that's in $path instead of the intended local executable.
>
>So I'm not strongly concerned about danger; what is the behavior you'd find
>troubling?
My main concern is if someone would be in the habit of doing command
completion and then hitting enter without looking at the results. If
done when there's a typo in the prefix that was used it could complete
to something from an untrusted directory instead.
Yes, this requires a few things to go wrong in just the right way for it
to happen. But enabling this option would generally be a one-time thing
for a user, and they may not consider this type of case at the time, and
after awhile even forget about it.
next prev parent reply other threads:[~2021-12-08 1:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 19:15 Marlon Richert
2021-12-08 0:22 ` Aaron Schrab
2021-12-08 0:50 ` Bart Schaefer
2021-12-08 1:16 ` Aaron Schrab [this message]
2021-12-08 16:25 ` Daniel Shahaf
2021-12-08 17:07 ` Bart Schaefer
2021-12-08 19:13 ` Daniel Shahaf
2021-12-08 23:16 ` Oliver Kiddle
2021-12-08 23:42 ` Bart Schaefer
2021-12-09 21:19 ` 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=YbAHa8bRRd/Mgb3B@pug.qqx.org \
--to=aaron@schrab.com \
--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).