Created
February 10, 2014 23:21
-
-
Save joehoyle/8926266 to your computer and use it in GitHub Desktop.
.zshrc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run wp-cli from the host machine | |
wp() { | |
DIR=`basename $PWD` | |
ARGS=$* | |
vagrant ssh -c "cd /srv/www/${DIR} ; wp ${ARGS}" | |
} | |
# SSH into vagrant directly to your current directory on the hostmachine | |
vssh() { | |
DIRS=`echo $PWD | sed -e 's,.*projects,/srv/www,'` | |
ARGS=$* | |
ssh [email protected] -t "cd ${DIRS} ; zsh -l" | |
} | |
# Run any command in Vagrant from the host machine, will use the same dir as you are in | |
v() { | |
ARGS=$* | |
DIRS=`echo $PWD | sed -e 's,.*projects,/srv/www,'` | |
vagrant ssh -c "cd ${DIRS} ; ${ARGS}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment