Install NVM on Fish Shell

Fish Shell

Fish Shell

Fish is a smart and user-friendly command line shell for macOS, Linux, and the rest of the family. Fish includes features like syntax highlighting, autosuggest-as-you-type, and fancy tab completions that just work, with no configuration required.

Fish has “search as you type” automatic suggestions based on history and current directory. This is essentially like Bash’s Ctrl+R history search, but because it is always on instead of being a separate mode, the user gets continuous feedback while writing the command line, and can select suggestions with the arrow keys, or as in Bash, press Tab ↹ for a tab completion instead.

Tab-completion is feature-rich, expanding file paths (with wildcards and brace expansion), variables, and many command specific completions. Command-specific completions, including options with descriptions, can to some extent be generated from the commands’ manpages.

Plugin Manager

Fish shell has many plugin managers

  • chips
  • fisher
  • fisherman
  • fundle
  • oh-my-fish

But for now, We will use Fisher, a plugin manager for Fish—the friendly interactive shell. Here some advantage Fisher

  • Manage functions, completions, bindings, and snippets from the command line. Extend your shell capabilities, change the look of your prompt and create repeatable configurations across different systems effortlessly.
  • 100% pure-Fish—easy to contribute to or modify.
  • Blazing fast concurrent plugin downloads.
  • Zero configuration out of the box.
  • Oh My Fish! plugin support.

Install Fisher and NVM

For install NVM on Fish, first we need execute this command

1
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher

After that install NVM with this command

1
fisher install jorgebucaran/nvm.fish

That’s it. Fisher and NVM has successfully installed to Fish shell.

Install Fisher | Install NVM

Thereafter, We can install node via NVM, for example I install node LTS version.

Install Node

  • Install the latest Node release and activate it.
1
nvm install latest
  • Install the latest LTS (long-term support) Node release.
1
nvm install lts

Install node LTS

  • Install an older LTS release by codename.
1
nvm install carbon

The nvm install command activates the specified Node version only in the current environment. If you want to set the default version for new shells use:

1
set --universal nvm_default_version v16.15.0

Make default node version

Install NPM Package

1
npm install -g npm@latest

Update npm

  • Example install firebase-tools
1
npm install -g firebase-tools

Install firebase-tools

Version

Removing Plugin

1
fisher remove jorgebucaran/nvm.fish
Bantu bagikan halaman ini ke:
Built with Hugo
Theme Stack designed by Jimmy