Skip to content

Instantly share code, notes, and snippets.

@keichan34 keichan34/config.fish
Last active May 26, 2016

Embed
What would you like to do?
I got tired of loading nvm every time in my fish shell, so this.
# Requires bass and nvm
# bass: https://github.com/edc/bass
# nvm: https://github.com/creationix/nvm
function nvm
set -g NVM_LOADED "1"
bass source ~/.nvm/nvm.sh ';' nvm $argv
end
function ensure_nvm_loaded
if [ "$NVM_LOADED" != "1" ]
set_color green
echo "Loading nvm..."
set_color normal
nvm > /dev/null
end
end
function node
ensure_nvm_loaded
command node $argv
end
function npm
ensure_nvm_loaded
command npm $argv
end
function ember
ensure_nvm_loaded
command ember $argv
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.