Implicitly launch detached program (&) from terminal

I feel sure this will end up as a duplicate, but I don't know how to word it so that I can search for it...

I like to do my programming in emacs, which I launch from the terminal. When I use my mac I use aquamacs and the command

aquamacs Program.py

will launch aquamacs in a separate window ready to edit Program.py. When I work on my linux machine however to get the same result I must type

emacs Program.py &

And I'm always forgetting the "&". So 70% of the time I end up closing the emacs window, and relaunching again with the "&". Now I understand why that "&" is there, but is there a way to set up my system so that the command

emacs Program.py

always launches as a detached process? The only time I might not want that behavior is if I was SSHing in over a slow connection, in which case I usually use "-nw" anyway.

Answers


You can click on the terminal and press Ctrl-Z to move an already running foreground process to the background.

Alternatively you could add this function to your ~/.bashrc:

emacs() {
    command emacs "$@" &
}

Need Your Help

Viewing SSRS Reports in an ASP.net MVC Site

c# asp.net-mvc reportviewer reporting-services

Is there a way to put a SQL Server Reporting Services report viewer control on an ASP.net MVC view? If not...what is the best way to accomplish this?

Object initialization failed in static block

java oop java-ee constructor static-block

I want to create an array of class objects and initialize it also without using any method so i wrote code like this:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.