* 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
zsh-users
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://inbox.vuxu.org/zsh-users
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V1 zsh-users zsh-users/ http://inbox.vuxu.org/zsh-users \
zsh-users@zsh.org
public-inbox-index zsh-users
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://inbox.vuxu.org/vuxu.archive.zsh.users
code repositories for the project(s) associated with this inbox:
https://git.vuxu.org/mirror/zsh/
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git