tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

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



On Sun, Sep 22, 2024 at 09:09:06AM +0200, tlaronde%kergis.com@localhost 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
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index