Re: simple alias doesn't work
- From: Barry Margolin <barmar@xxxxxxxxxxxx>
- Date: Wed, 27 Sep 2006 14:19:01 -0400
In article <1159353644.759316.96570@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
bpatton@xxxxxx wrote:
I'm running on a linux box and trying to get this simple alias to
function
alias tvim "xterm -e vim $* &"
I want it to pop a new xterm with the vim editor open.
example input
$ tvim a b c d
A new xterm opens with vim and 4 files in vim's buffers.
The correct syntax for the alias in tcsh is:
alias tvim 'xterm -e vim \!:* &'
Aliases use history substitution to process their arguments, not shell
parameter syntax. Also, since you used doublequotes instead of
singlequotes, $* was expanded at the time that you defined the alias,
rather than when you used it.
--
Barry Margolin, barmar@xxxxxxxxxxxx
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
.
- References:
- simple alias doesn't work
- From: bpatton
- simple alias doesn't work
- Prev by Date: Re: substituing $1 one time but not the other
- Next by Date: Re: substituing $1 one time but not the other
- Previous by thread: Re: simple alias doesn't work
- Next by thread: Re: simple alias doesn't work
- Index(es):
Relevant Pages
|