On Mon, May 01, 2006 at 10:21:33AM +0300, Erez D wrote: > On 5/1/06, Oded Shimon <[EMAIL PROTECTED]> wrote: > > > >On Mon, May 01, 2006 at 09:35:27AM +0300, Erez D wrote: > >> hi > >> > >> i have in csh: > >> alias vi 'gvim \!* &' > >> > >> i tryed translating to bash as > >> > >> alias vi='gvim $* &' > >> > >> this works without the ampersand, bit not with it > > > >aliases are replacement text, not scripts. whatever you set in your alias > >will be written as is, as if you wrote it manually. so you're basically > >typing: > > > >$ vi bla > >=> > >$ gvim $* & bla > > > >> or > >> > >> vi() {gvim $* & ; } > > > >the ';' is redundant, even possibly illegal. > >And you always want "$@", almost never $*. > >So > > > >vi(){gvim "$@" &} > > > $ vi(){gvim "$@" &} > bash: syntax error near unexpected token `('
Sorry, I'm used to zsh, Seems bash works differently: vi(){ gvim "$@" & } - ods15 ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]