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
Post a Comment