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
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
After that install NVM with this command
fisher install jorgebucaran/nvm.fish
That’s it. Fisher and NVM has successfully installed to Fish shell.
Thereafter, We can install node via NVM, for example I install node LTS version.
Install Node
- Install the latest Node release and activate it.
nvm install latest
- Install the latest LTS (long-term support) Node release.
nvm install lts
- Install an older LTS release by codename.
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:
set --universal nvm_default_version v16.15.0
Install NPM Package
npm install -g npm@latest
- Example install firebase-tools
npm install -g firebase-tools
Removing Plugin
fisher remove jorgebucaran/nvm.fish