* non-executables in PATH and tab-completion
@ 2021-03-08 16:10 Dominik Vogt
2021-03-08 16:23 ` Peter Stephenson
0 siblings, 1 reply; 2+ messages in thread
From: Dominik Vogt @ 2021-03-08 16:10 UTC (permalink / raw)
To: Zsh Users
If there are files without executable flags in the PATH, zsh still
completes these. (a) Is this a bug? (b) can this be disabled?
Example:
$ mkdir -p ~/tmp/bin
$ cd ~/tmp/bin
$ touch foo.sh foo.bar
$ chmod 640 foo.bar
$ chmod 750 foo.sh
$ export PATH="$HOME/tmp/bin:$PATH"
$ hash -rf
$ foo.<tab>
foo.bar foo.sh
Tab is bound to "expand-or-complete".
$ zsh --version
zsh 5.7.1 (x86_64-debian-linux-gnu)
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: non-executables in PATH and tab-completion
2021-03-08 16:10 non-executables in PATH and tab-completion Dominik Vogt
@ 2021-03-08 16:23 ` Peter Stephenson
0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2021-03-08 16:23 UTC (permalink / raw)
To: Zsh Users
> On 08 March 2021 at 16:10 Dominik Vogt <dominik.vogt@gmx.de> wrote:
> If there are files without executable flags in the PATH, zsh still
> completes these. (a) Is this a bug? (b) can this be disabled?
This option is what you need to know about... it's not specific to
completion, which just uses the normal command hash table.
HASH_EXECUTABLES_ONLY
When hashing commands because of HASH_CMDS, check that the file to be
hashed is actually an executable. This option is unset by default as if
the path contains a large number of commands, or consists of many remote
files, the additional tests can take a long time. Trial and error is
needed to show if this option is beneficial.
pws
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-08 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-08 16:10 non-executables in PATH and tab-completion Dominik Vogt
2021-03-08 16:23 ` Peter Stephenson
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).