1

At work, in csh, I use this alias in my .alias file:

alias n  'nedit \!* &'

I can then type --> n file1 file2 ... file, and nedit will start in the background with each of the files in a separate tabbed window, leaving my terminal free for other tasks.

Now, in BASH, I can't do the file insertions without using a function, but then how do I also get the application in the background?

function n()
{
   nedit "$@";
}

If I add an & between the second quote and the semi-colon, I get a syntax error.

Thanks for the help, Eric

Eric Lund
  • 45
  • 5

1 Answers1

2

Just an ampersand, no semicolon:

function n()
{
   nedit "$@" &
}
rob mayoff
  • 375,296
  • 67
  • 796
  • 848