Skip to content

Instantly share code, notes, and snippets.

@joehoyle
Last active December 22, 2015 22:19
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joehoyle/6539140 to your computer and use it in GitHub Desktop.
Save joehoyle/6539140 to your computer and use it in GitHub Desktop.
v() {
DIR=`echo $PWD | sed 's,.*/projects,,'`
ARGS=$*
ssh -t vagrant@192.168.50.10 "cd /srv/www${DIR} ; ${ARGS}" 2> /dev/null
}
alias wp="v wp"
alias grunt="v grunt"
@joehoyle
Copy link
Author

Proxy commands to Vagrant

If you are running an uber-cool swanky vagrant environment, and you hate having to vagrant ssh to do some stuff like running wp-cli or grunt then this is for you! This simple function will let you proxy any command inside your Projects dir (if you are using Salty-WordPress or VVV)

output_optimized

@westonruter
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment