Re: sh(1): POSIX "Command Search and Execution"

David Holland <[email protected]>
Newsgroups gmane.os.netbsd.devel.userlevel
Message-ID <[email protected]>
On Sun, Sep 22, 2024 at 09:09:06AM +0200, [email protected] wrote:
 > [stuff about searching $PATH for more things]

A different and much less invasive way to get the first 90% of this is
to pick an otherwise unused metacharacter (e.g. @) and use it as a tag
meaning "search for the rest of this on $PATH", the same way ~ is a
tag that means "find this name by starting in $HOME".

Then you just write @foo/ls or @bar/ls. You could also extend it to
work on arguments as well as command names, though you'd probably want
it to use a different search path variable.

-- 
David A. Holland
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.