Skip to content

Instantly share code, notes, and snippets.

@metavida
Last active December 11, 2015 22:18
Show Gist options
  • Save metavida/4668517 to your computer and use it in GitHub Desktop.
Save metavida/4668517 to your computer and use it in GitHub Desktop.
A handy rvm hook so that hitch automatically loads whenever you cd into an rvm project directory.
#!/usr/bin/env bash
# Add this file to your ~/.rvm/hooks/ directory to auto-initiate hitch
# whenever you cd into a project where the hitch gem is installed in the current rvm gemset.
if [[ -r ./.rvmrc && -n $(which hitch) && -x $(which hitch) ]]; then
echo 'Starting hitch'
hitch
fi
@metavida
Copy link
Author

To quickly & easily install this file

git clone https://gist.github.com/4668517.git ~/.rvm/hooks/after_cd_hitch
chmod +x ~/.rvm/hooks/after_cd_hitch

Learn more about hitch and rvm hooks.

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