LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   alias or function in .bashrc, which sends command to background (https://www.linuxquestions.org/questions/linux-general-1/alias-or-function-in-bashrc-which-sends-command-to-background-19201/)

ngomong 04-23-2002 06:07 AM

alias or function in .bashrc, which sends command to background
 
I'm trying to set up a simple alias that would function thusly:

"e temp.txt" would be the same as typing "emacs temp.txt &"
I've tried:

function e () {
emacs "$1" &
}

... which opens emacs... but it's not sent into the background. (Maintains focus in the xterm).

Does anybody know the solution?

ngomong 04-23-2002 09:50 PM

Aha, got it to work...

function ee () { emacs $* & }

For some reason, if the function name is only one letter long, it doesn't work... two or more, and it does.

I'll accept this for now. :)


All times are GMT -5. The time now is 08:38 AM.