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.zshrcyou wouldautoloadthe function in order to use it. – fd0 May 26 '17 at 15:40echo $SHELL? – William T Froggard May 26 '17 at 16:25echo $SHELLreturns /bin/zsh – Urs May 27 '17 at 08:54