I am using zsh with oh-my-zsh in iTerm on macOS. There are some aliases defined in my .zshrc I use often, like this:
deploy(){
cd ~/Path/To/My/Project;
build ...;
rsync ...;
}
To execute this, I have to switch over to iTerm and run the alias. Now I'd like to be able to do that from anywhere via a hotkey.
I've read that automator is the tool of choice.
I created an action "run shell script" and chose `/bin/zsh/' from the list of available shells.
But running my alias returns zsh:1: command not found
.
Am I on the wrong shell? But echo $0
in iTerm gives me -zsh
.
How can I run my alias without being in the iTerm window? Any approach will do, Automator is just how I'm trying to accomplish it.
fpath
. In your.zshrc
you wouldautoload
the function in order to use it.echo $SHELL
?echo $SHELL
returns /bin/zsh