fish
Official site: https://fishshell.com/
Install
Mac:
brew install fish
Set As Default Shelloptional
Make sure where fish is:
$ which fish
/usr/local/bin/fish
Check if fish is a system shell now:
cat /etc/shells
If there is no fish shell, add it into /etc/shells
:
/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh
+ /usr/local/bin/fish
You can set it as default shell:
Set it as default shell:
chsh -s /usr/local/bin/fish
Fisher
Fisher is a package manager for the fish shell.
Install:
curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish
If you can't use fisher
command, try re-login the shell.
Spacefish
Spacefish is a minimalistic, powerful and extremely customizable Fish Shell prompt. It combines everything you may need for convenient work, without unnecessary complications, like a real spacefish.
fisher add matchai/spacefish
Other commands
List packages:
fisher ls
fisher ls <regexp>
fisher ls "^gitlab|fish-.*"
Update packages:
fisher
Update fisher:
fisher self-update
Remove package:
fisher rm <packageName>
fisher rm rafaelrinaldi/pure
Remove all packages:
fisher ls | fisher rm
Uninstall fisher:
fisher self-uninstall
Fixing Perl Warning: Setting locale failed on Mac OS
You might see this while you execute fisher
:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset),
LANG = "en_TW.UTF-8"
are supported and installed on your system.
Edit fish config:
vi ~/.config/fish/config.fish
Add locale environment variables:
+ export LC_CTYPE=en_US.UTF-8
+ export LC_ALL=en_US.UTF-8
Reference: Fixing Perl Warning: Setting locale failed on Mac OS X Mavericks
Integrate with nvm
Node Version Manager - Simple bash script to manage multiple active node.js versions
To install or update nvm, you can use the install script using cURL:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
or Wget:
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
Then install fish-nvm:
fisher add FabioAntunes/fish-nvm edc/bass
If node is not loaded at start, create a init script:
vi ~/.config/fish/conf.d/nvm.fish
and enter:
nvm use node
If you always want to use the latest version, use the followed scripts instead:
nvm install node
# latest npm and yarn
npm i -g npm yarn
then try another session.
Integrate with Docker
Migrate with docker(archived):
fisher add barnybug/docker-fish-completion
Migrate with docker-compose:
fisher add brgmnn/fish-docker-compose
Integrate with Visual Studio Code
Edit settings.json:
{
"terminal.integrated.shell.osx": "/usr/local/bin/fish"
}
Integrate with Hyper.js
Edit ~/.hyper.js
:
module.exports = {
shell: '/usr/local/bin/fish',
};
Windows alternative
Cmder is a software package created out of pure frustration over the absence of nice console emulators on Windows. It is based on amazing software, and spiced up with the Monokai color scheme and a custom prompt layout, looking sexy from the start.