Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: completion ignoring



Vincent Lefevre <Vincent.Lefevre@xxxxxxxxxxx> writes:
> But why does zsh take all the files from the directories that are
> in $PATH, and not only the files that can be executed by the user?

Quoting Bruce Stephens (b.stephens@xxxxxxxxx):
> It does only consider executable files.  There's nothing wrong with a
> command ending in ~1~ or ,v.  Other than looking at the executable
> bit, how should zsh determine which files are really executable?

I think Vincent.Lefevre meant this:

When using command name expansion (correct term?)
can the zsh check the permissions on the executable files
and present those that are actually executable for the user?

Example:  Let's assume that the current dir (ie '.') is in the $PATH [*].
Then the zsh should behave like this:

	$ touch foo
	$ chmod 700 foo
	$ f<TAB>
	"foo" is shown
	$ chmod 600 foo
	$ f<TAB>
	"foo" is NOT shown

Is this possible?  (I hope that's not in the manual. ;-)

[*] Yes, I know this is a bad thing.  it's just an example, ok?  ;-)

Sven

-- 
Sven Guckes guckes@xxxxxxxxxxxxxxxxx            using zsh-3.0.5 [961218]
ZSH HomePage: http://www.zsh.org   | Latest version:  zsh-3.1.3 [980501]
ZSH Pages:    http://www.math.fu-berlin.de/~guckes/zsh/  Tips and tricks



Messages sorted by: Reverse Date, Date, Thread, Author