I’ve created several bash aliases in Git Bash on Windows, to launch executables from the bash shell.
The problem I am having is that is seems the bash is waiting for an exit code before it starts responding to input again, as once I close the app it launched, it starts taking commands again.
Is there a switch or something I can include in the alias so that bash doesn’t wait for the exit code?
I’m looking for something like this…
alias np=notepad.exe --exit
I confirm what George mentions in the comments:
Launching your alias with ‘
&‘ allows you to go on without waiting for the return code.With:
you won’t even have to type in the ‘
&‘.But for including parameters, I would recommend a script (instead of an alias) placed anywhere within your path, in a file called “
npp“:would allow you to open any file with “npp anyFile” (no ‘
&‘ needed), without waiting for the return code.A script like:
would launch several editors, one per file in parameters:
would allow you