transparent vagrant subdirectory
in many projects, you might have your vagrant stuff contained within a subdirectory.
but lazy people like me tend to not want to cd vagrant
and vagrant up
and cd ..
back, so with this little alias you can stay right in you project's root and use vagrant as if it was not scoped.
alias vagrant='VAGRANT_CWD=$(ls -d vagrant 2>/dev/null || echo ''.'') vagrant'
just insert this line into your .bashrc, .profile, or .zshrc and your'e good to go!
(p.s. change the first occurrence of 'vagrant' to whatever your subdirectory is called.)
Written by Simon Waibl
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#