[zsh] Dear lazyweb
February 3, 2010
I’ve recently been looking for a simple way to launch a program from the CLI in such a way that it is totally detached from the shell, i.e. it is launched in the background and is not connected to the shell’s console. Currently, I’m using the following zsh alias:
alias -g "\&"="&>/dev/null&|"
Now I can launch apps totally detached by writing:
inkscape picture.svg \&
The advantage is that the extra syntax is quite short, and that I can add it after having typed in the whole command (which is a clear convience plus compared to, for instance, prepending “kdeinit4_wrapper”). Still, it has some problems, like that omitting the space before the “\&” won’t work. (zsh will think that I’m looking for the executable “inkscape&”.) Also, bash does not know global aliases AFAIK. Do you know an easier way for me to do what I want?
[b]Update:[/b] Exchanged the trailing “&” for “&|” which, as MathStuf noted in the comments, disowns the process, thereby working around the annoying “You have stopped jobs.” message that appears when you ^D the shell for the first time. Thanks for the hint!