LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   bash equivalence of tcsh "alias em "emacs \!:1 &""? (https://www.linuxquestions.org/questions/slackware-14/bash-equivalence-of-tcsh-alias-em-emacs-%5C-1-and-210843/)

rgiggs 07-28-2004 09:05 PM

bash equivalence of tcsh "alias em "emacs \!:1 &""?
 
hi,
i want to be able to type "em foo" and have bash execute "emacs foo &" How can I do that? I know how to achieve the effect in tcsh: alias em "emacs \!:1 &" However, bash doesn't seem to interpret the "\!:1" the same way tcsh does.
thanks.

Cedrik 07-29-2004 12:49 AM

Try (you can put this line on ~/.bashrc) :
Code:

em() { emacs $1 &; }

rgiggs 07-29-2004 02:00 AM

it works if i remove the ";" bash says it's syntax error. but thanks.
Code:

em() { emacs $1 & }

Cedrik 07-29-2004 02:07 AM

;) Great


All times are GMT -5. The time now is 05:35 AM.