Created
February 3, 2022 16:05
-
-
Save travisseitler/b062d5c31abaeb77e6f386564394d0cb to your computer and use it in GitHub Desktop.
Bash function to run Vagrant commands against VVV machine, regardless of current local directory
This file contains 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
################ | |
# VVV Anywhere # | |
################ | |
# Instructions: | |
# - Paste the function below into your `.bashrc`/`.bash_profile`/`.zshrc` config. | |
# - Reload (e.g. "$ source ~/.zshrc") or open a new shell/terminal window. | |
# Use Vagrant commands on VVV from anywhere (not just inside VVV's directory). | |
# | |
# Examples: | |
# [old] $ cd ~/vvv-local; vagrant ssh | |
# [new] $ vvvagrant ssh | |
# | |
# [old] $ cd ~/vvv-local; vagrant up --provision | |
# [new] $ vvvagrant up --provision | |
# | |
vvvagrant(){ | |
cd ~/vvv-local; # Default location; change this if VVV is installed elsewhere. | |
vagrant "$@" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment