1
I have the following binary:
~/wren/wren
This is an interpreter for a scripting language. Running it like:
cd ~/wren
./wren myscript.wren
will execute the script. I would like to create an alias that allows me to run the interpreter from anywhere with one command, just like running Ruby interpreter. This would also require the alias to preserve command line argument passed to the interpreter. I have tried adding the following:
alias wren='~/wren/wren "$@"'
to .zshenv but, typing in wren myscript.wren produces command not found error.
1You do not need to (with emphasis on "do not") explicitly mention arguments in the alias definition. So
alias wren='~/wren/wren'
is the way to go. But that does not explain the error message. Can you please check withwhence -c wren
, if the alias is indeed correctly defined? – Adaephon – 2017-03-27T13:52:49.490System restart solved the problem :--) – Jan Parzydło – 2017-03-27T21:58:30.540