osx - How to make an alias of a command which accepts an argument and is executed on background? -



osx - How to make an alias of a command which accepts an argument and is executed on background? -

i want create alias open file gui editor on background command line. tried:

alias new_command="editor_path &" new_command file

open editor without loading file.

the & ending command, not seeing file argument. can't utilize alias if want substitute filename string command ampersand on end.

from bash manpage:

there no mechanism using arguments in replacement text. if arguments needed, shell function should used (see functions below).

consider creating shell function:

function new_command { editor_path "$1" & }

osx unix command-line text-editor alias

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -