[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature-request: brief syntax for $(type -p somecommand)
From: |
Mike Coleman |
Subject: |
Re: feature-request: brief syntax for $(type -p somecommand) |
Date: |
Thu, 2 Apr 2009 15:46:37 -0500 |
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).
Mike
Message not available
Message not available
Re: feature-request: brief syntax for $(type -p somecommand), Matthew Woehlke, 2009/04/06