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

Re: whence output varies with dot vs. realpath in $PATH




On 2022-10-31 16:38, Bart Schaefer wrote:
It's an archaic synonym for ".", included for backward compatibility.
See POSIX spec.

Not me!  Nothing I need worry about.  Strange tho, if you want dot on your path then say so.  I'm glad it's archaic, that's sloppy magic.  BTW as to '-a' and '-m' they sure don't get along. I have a few examples where they seem to try to cancel each other.  Seems to me that -m is an expansion of -a: show all matches AND extend that to wildcards.  So -m subsumes -a.


If you don't mind the overhead, you can muck around with $path in your
chpwd function to force the full current directory to always be there.

Na I'm good.  It's just that I want full path disclosure in my function cuz I need the full path later on.  My crude search (not prettied up yet) seems about right:


Searching for aliases, reserved words and autoloads. Then searching the path for regular functions, builtins (no path), and executable scripts or binary commands ...
Found 9 match(es):

ACTIVE: RAP is an alias for echo howdy
             RAP is /aWorking/Zsh/Source/Wk/RAP
ACTIVE: RAp is /aWorking/Zsh/Source/Wk/RAp
ACTIVE: RaP is /aWorking/Zsh/Source/Wk/RaP
ACTIVE: bwrap is /usr/bin/bwrap
ACTIVE: rAp is /aWorking/Zsh/Source/Wk/rAp
ACTIVE: rap is an alias for echo pard
             rap is a shell function from rap
ACTIVE: select-default-iwrap is /usr/bin/select-default-iwrap
ACTIVE: _trap is an autoload shell function
ACTIVE: trap is a shell builtin

... it's all there and where we have a name conflict I know which twin is active.

BTW, you know what would be sweet, is if: "rap is a shell function from rap" ... if there was the option of having that displayed with full path.  Throw in a case-insensitive option and all the work I've done in this function will be mostly obviated.






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