Skip to content

Instantly share code, notes, and snippets.

@kmikko
Created July 19, 2016 11:47
Show Gist options
  • Save kmikko/c7c46979d300d98e290227110b35e34e to your computer and use it in GitHub Desktop.
Save kmikko/c7c46979d300d98e290227110b35e34e to your computer and use it in GitHub Desktop.
Fish shell, check for .nvmrc file
# ~/.config/fish/functions/check_nvmrc.fish
function check_nvmrc --on-variable PWD
if test -e .nvmrc
eval "nvm use"
end
end
# ~/.config/fish/fish.config
source ~/.config/fish/functions/check_nvmrc.fish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment