If possible, try to use the zsh/parameter module to get
information about a shell words.
This avoids subshells and is a huge speed improvement
on systems such as cygwin.
Note 1:
$commands does not know about PATH_DIRS. So in case
PATH_DIRS is set, 'type -w' is still used if nothing
else matches.
Note 2:
zsh/parameter can't distinguish between 'command' and
'hashed'. Adjusted the test for that case to XFAIL.
The ideal solution would be if whence had an option to
put the result in REPLY instead of printing it to stdout.
All these files should be sourced, not executed; and Debian's lintian complains:
W: zsh-syntax-highlighting: script-not-executable usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
* highlighters/main/test-data/hashed-command.zsh:
Set the right region key. This makes the test more specific.
(Issue #184 would have caught this bug.)