ab780cd3a8
This script is configured to intercept the `ssh` command and boot the associated VM Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
13 lines
241 B
Bash
Executable File
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
|