Skip to content

Instantly share code, notes, and snippets.

View v3rse's full-sized avatar
💭
Reshaping the un1v3rse

Nana Ofosuhene Adane v3rse

💭
Reshaping the un1v3rse
View GitHub Profile
@v3rse
v3rse / load_nvm.fish
Last active April 3, 2024 04:59
A faster NVM shell integration for Fish shell. No need for bass (DEPENDENCIES: https://github.com/jorgebucaran/nvm.fish)
# loader functions. place this in your fish functions directory. call it in your config.fish file
function load_nvm --on-variable="PWD"
set -l default_node_version "system"
set -l node_version (nvm current)
set -l nvmrc_path (nvm_find_nvmrc)
if test -n "$nvmrc_path"
set -l nvmrc_node_version (nvm_find_nvmrc_version)
if test "$nvmrc_node_version" != "$node_version"
set -l use_status (nvm use $nvmrc_node_version 2>&1)