Article View: gnu.bash.bug
Article #1016should argument substitution work in aliases?
From: Jeff Kellem
Date: Mon, 12 Jun 1989 23:42
Date: Mon, 12 Jun 1989 23:42
22 lines
1027 bytes
1027 bytes
In aliases, no. (as far as I know.)
To note: if you look at what bash sorted as your alias for say ...
bash$ alias foo="echo .$1.$2."
bash$ alias foo
alias foo="echo ..."
you will get the above, with the $1, $2, etc being interpreted
when you define the alias.
But, in functions..yes, just as in your last try.
which is as follows ...
> 7=> baz () { echo $*; }
> 8=> baz bar barf
> bar barf
Enjoy...
-jeff
Jeff Kellem
INTERNET: composer@bu-cs.bu.edu (or composer%bu-cs.bu.edu@bu-it.bu.edu)
UUCP: ...!harvard!bu-cs!composer
Technical Details
Message-ID:
<8906122342.AA11340@bu-cs.BU.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!BU-CS.BU.EDU!composerReferences:
<2466@perseus.sw.mcc.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!BU-CS.BU.EDU!composer From: composer@BU-CS.BU.EDU (Jeff Kellem) Newsgroups: gnu.bash.bug Subject: should argument substitution work in aliases? Message-ID: <8906122342.AA11340@bu-cs.BU.EDU> Date: 12 Jun 89 23:42:28 GMT References: <2466@perseus.sw.mcc.com> Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 22