https://github.com/dominik-schwabe/zsh-fnm
Plugin for ZSH to install the Fast Node Manager (fnm).
https://github.com/dominik-schwabe/zsh-fnm
Last synced: 3 months ago
JSON representation
Plugin for ZSH to install the Fast Node Manager (fnm).
- Host: GitHub
- URL: https://github.com/dominik-schwabe/zsh-fnm
- Owner: dominik-schwabe
- License: mit
- Created: 2020-10-20T21:05:11.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T11:37:08.000Z (over 2 years ago)
- Last Synced: 2024-12-27T04:32:25.686Z (11 months ago)
- Language: Shell
- Size: 11.7 KB
- Stars: 16
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zsh-plugins - fnm (dominik-schwabe) - Installs and loads the [Fast Node Manager (fnm)](https://github.com/Schniz/fnm) if it is missing. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - fnm (dominik-schwabe) - Installs and loads the <b><code> 22650⭐</code></b> <b><code> 590🍴</code></b> [Fast Node Manager (fnm)](https://github.com/Schniz/fnm)) if it is missing. (Plugins / ZSH on Windows)
README
# ZSH Plugin - Fast Node Manager (fnm)
ZSH Plugin to install and load the [Fast Node Manager (fnm)](https://github.com/Schniz/fnm).
## Installation
### [Zi](https://github.com/z-shell/zi)
add the following to your `.zshrc`
```zsh
zi light "dominik-schwabe/zsh-fnm"
```
with configurations
```zsh
zi ice atinit'ZSH_FNM_NODE_VERSION=15.0.0'
zi light "dominik-schwabe/zsh-fnm"
```
with configurations + turbo mode
```zsh
zi ice wait lucid atinit'ZSH_FNM_NODE_VERSION=15.0.0'
zi light "dominik-schwabe/zsh-fnm"
```
## Configuration
### ZSH_FNM_NODE_VERSION
Set this environment variable to automatically install a node version and use it.
e.g.
```zsh
export ZSH_FNM_NODE_VERSION="15.0.0"
```
### ZSH_FNM_ENV_EXTRA_ARGS
Pass extra arguments to `fnm env`.
e.g.
```zsh
export ZSH_FNM_ENV_EXTRA_ARGS="--use-on-cd"
```
### ZSH_FNM_INSTALL_DIR
Set a fixed location where fnm gets installed.
e.g.
```zsh
export ZSH_FNM_INSTALL_DIR="$HOME/.fnm"
```
## Similar Projects
- [zsh-nvm](https://github.com/lukechilds/zsh-nvm)
## Contributions
I don't use fnm anymore (i use [asdf](https://github.com/asdf-vm/asdf)) but since this project is so small and easy to maintain, any contributions are welcome.