On Thu, Apr 2, 2009 at 11:57 AM, Chris F.A. Johnson <cfaj@freeshell.org> wrote:
If that's what you want, you can include it in the function:
p()
{
_p=$( type -p "$@" )
[ -n "$_p" ] && ls -l $_p
}
This is more or less what I'm doing now, with one function for each
command. I suppose the command could be an argument, too, so that one
could run
$ p ls somecommand
$ p ldd somecommand
$ p strings somecommand
$ p file somecommand
$ p nm somecommand
though there's no command completion this way. I guess I could add that, too.
One problem, though, like the "wait for slot" feature I suggested a
few months ago, is that something like this is quite a bit more useful
when it's available everywhere (without having to drag one's bash
library around).