PDA

View Full Version : UNIX-Running Editors in the Background‏



superdan006
May 22nd, 2009, 04:57 PM
Hi,
In UNIX, I want to alias gedit so that it will run in the background. Ie.,

alias gedit='gedit file &'

Do you have any ideas? I have had a lot of trouble with this one.
Cheers,
-Dan

unutbu
May 22nd, 2009, 05:06 PM
If file is a string which never changes, then you could do


alias ge='gedit file &'

If you want to allow file to change then you could define a function in your .bashrc like this:


ge() {
gedit "$@" &
}

and use it like this:


ge filename