scripts/preexec.zsh

13 lines
241 B
Bash
Executable File

#!/bin/zsh
#
# Be sure to add:
# preexec() { /path/to/script/preexec.zsh $* }
# to your .zshrc
cmd=($(echo "$1" | sed 's/\-\w //g'))
# Boot offline VMs
if [[ $cmd[1] == "ssh" ]]; then
vm.zsh boot $(echo $cmd[2] | sed 's/^\w*@//')
fi