Skip to content

Instantly share code, notes, and snippets.

@nowk
Last active August 29, 2015 14:01
Show Gist options
  • Save nowk/b7d1835b539407651492 to your computer and use it in GitHub Desktop.
Save nowk/b7d1835b539407651492 to your computer and use it in GitHub Desktop.
Poor mans .nvmrc and other preloaded requirements
# ~/.ondirrc
enter ~/Documents/(<your|folder|names|here)/([^/]+)
[[ -s $HOME/<pathtoyour>/ondirrc.sh ]] && . $HOME/<pathtoyour>/ondirrc.sh
# reload for tmux
if [ -n "$TMUX" ]; then
[[ -s $HOME/<pathtoyour>/ondirrc.sh ]] && . $HOME/<pathtoyour>/ondirrc.sh
fi
echo 'checking for .ondirrc...'
if [ -r .ondirrc ]; then
. ./.ondirrc
echo 'loaded .ondirrc'
else
echo 'no .ondirc, goodbye.'
fi
# individual project .ondirrc
export FOO=bar
nvm use stable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment