bug-bash
[Top][All Lists]
Advanced

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

Re: feature-request: brief syntax for $(type -p somecommand)


From: Matthew Woehlke
Subject: Re: feature-request: brief syntax for $(type -p somecommand)
Date: Mon, 06 Apr 2009 10:49:48 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.21) Gecko/20090320 Fedora/2.0.0.21-1.fc10 Thunderbird/2.0.0.21 Mnenhy/0.7.5.0

Mike Coleman wrote:
It would be nice if there was some really brief syntax for

$(type -p somecommand)

p() {
  local what=$(type -p $1)
  shift 1
  "$@" "$what"
}

p foobar ls -l
p foobar strings
...etc

also, 'complete -c p'

--
Matthew
Please do not quote my e-mail address unobfuscated in message bodies.
--
Anyone who is capable of getting themselves made President should on no account be allowed to do the job. -- The Hitchhiker's Guide to the Galaxy (Douglas Adams)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]