Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So I've got this working in a 10.04 ubuntu OS in bash where I can run:

$ gedit app/file.rb 

bash opens that file with gedit but it is tied up.

How can I make my earlier command equivalent to $ gedit app/file.rb & by default.

If it helps here is a copy of my .bashrc file from the 10.04 OS : http://pastie.org/4687219

share|improve this question
1  
is this even a question? –  VendettaDroid Sep 8 '12 at 21:34
add comment

2 Answers

Add this line to your .bashrc file:

function gedit(){ command gedit "$@" & }  

Now restart your terminal. gedit app/file.rb should now run in background.

Source

share|improve this answer
add comment

ignite is right. but still, I would create this function:

function gedit(){ command gedit "$@" &>/dev/null & }

throwing the output to /dev/null keeps your terminal clean and allows you to continue your work.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.