zsh-workers
 help / color / mirror / Atom feed
* [BUG] The commands array contains dirs instead of the actual executables
@ 2020-10-01 10:31 Rudi C
  2020-10-02  4:43 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Rudi C @ 2020-10-01 10:31 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 1434 bytes --]

❯ zsh -f
Fereidoons-MacBook-Pro% which dash
/bin/dash
Fereidoons-MacBook-Pro% which bash
/usr/local/bin/bash
Fereidoons-MacBook-Pro% echo ${commands[dash]}
/Users/evar/scripts///dash
Fereidoons-MacBook-Pro% echo ${commands[bash]}
/Users/evar/scripts///bash
Fereidoons-MacBook-Pro% echo ${commands[zsh]}
/Users/evar/scripts///zsh
Fereidoons-MacBook-Pro% ls -l /Users/evar/scripts/
total 0
drwxr-xr-x   9 evar  staff  288 Jul 16 12:49 applescript
drwxr-xr-x  12 evar  staff  384 Jul  8 16:35 bash
drwxr-xr-x   4 evar  staff  128 Sep 23 17:07 bin
drwxr-xr-x   4 evar  staff  128 Aug 11 01:29 clojure
drwxr-xr-x   3 evar  staff   96 Aug  8 00:05 configFiles
drwxr-xr-x   3 evar  staff   96 Apr 20 03:19 dash
drwxr-xr-x   3 evar  staff   96 Apr 16 21:13 deactivated-launchers
drwxr-xr-x   2 evar  staff   64 May 18 12:37 export
drwxr-xr-x   6 evar  staff  192 Sep 20 16:14 golang
drwxr-xr-x  13 evar  staff  416 Sep 19 13:24 javascript
drwxr-xr-x  10 evar  staff  320 Sep 28 00:04 launchers
drwxr-xr-x  30 evar  staff  960 Sep 23 18:38 python
drwxr-xr-x   5 evar  staff  160 Sep  4 10:34 resources
drwxr-xr-x   3 evar  staff   96 Apr 16 21:13 ruby
drwxr-xr-x   4 evar  staff  128 Jul 31 03:48 rust
drwxr-xr-x  20 evar  staff  640 Sep 21 17:41 setup
drwxr-xr-x   3 evar  staff   96 May  9 11:04 sh
drwxr-xr-x   3 evar  staff   96 Aug 25 00:46 supercollider
drwxr-xr-x  26 evar  staff  832 Sep  5 18:49 zsh

[-- Attachment #2: Type: text/html, Size: 1601 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [BUG] The commands array contains dirs instead of the actual executables
  2020-10-01 10:31 [BUG] The commands array contains dirs instead of the actual executables Rudi C
@ 2020-10-02  4:43 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2020-10-02  4:43 UTC (permalink / raw)
  To: Rudi C; +Cc: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 714 bytes --]

Please include at least some expository context in your messages, rather
than merely quote a command transcript.  The fact that there are multiple
slashes in your $commands values indicates to me that you're probably doing
something wrong with the setting of $path, but without context I can't
guess what.

Command hashing does not expect $path to include the names of directories
which further contain other subdirectories.  For speed, only the names of
the items found inside path directories are scanned/cached, rather than
examining the items themselves.

You can change this by "setopt hash_executables_only" or (I suspect) by
placing /Users/evar/scripts at the end of your $path instead of at the
beginning.

[-- Attachment #2: Type: text/html, Size: 804 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-02  4:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-01 10:31 [BUG] The commands array contains dirs instead of the actual executables Rudi C
2020-10-02  4:43 ` Bart Schaefer

zsh-workers

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-workers

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-workers zsh-workers/ http://inbox.vuxu.org/zsh-workers \
		zsh-workers@zsh.org
	public-inbox-index zsh-workers

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


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