Skip to content

Instantly share code, notes, and snippets.

View jasonfb's full-sized avatar

Jason Fleetwood-Boldt jasonfb

View GitHub Profile
@jasonfb
jasonfb / .zshrc
Last active December 9, 2022 15:52 — forked from callumlocke/.zshrc
ZSH function to auto-switch to correct Node version
####
# ZSH function to auto-switch to correct Node version
# https://gist.github.com/callumlocke/30990e247e52ab6ac1aa98e5f0e5bbf5
#
# - Searches up your directory tree for the closest `.node-version`, just like `nvm use` does.
#
# - If you are already on the right Node version, IT DOES NOTHING, AND PRINTS NOTHING.
#
# - Works correctly if your .nvmrc file contains something relaxed/generic,
# like "4" or "v12.0" or "stable".