Switching to Fish
There are several options for customizing your shell. This is a walkthrough of installing and setting up the Fish shell to be used with iTerm2.
Fish offers some very helpful tools such as: syntax highlighting, autosuggestions, and tab completions. The color schemes are also helpful with presentation. You can read more about this here: http://fishshell.com/docs/current/tutorial.html#tut_why_fish.
Helpful syntax documentation for Fish can be found here: http://fishshell.com/docs/current/tutorial.html.
Installation
- Install Fish using brew:
brew install fish
. If you don't have brew installed yet, visit http://fishshell.com/ to download Fish. By default, Fish is installed under/usr/local/
. - Install Oh-my-fish from GitHub (https://github.com/bpinto/oh-my-fish#installation).
Oh-my-fish is a framework for managing you fish-shell config. It includes optional plugins and themes (brew, git-flow, rails, python, node, etc).
You can view all built-in plugins in:
~/.oh-my-fish/plugins/
. - The plugins and other settings are set in the fish config file located:
~/.config/fish/config.fish
.
Set Up
- In addition, you will want to set Fish as your default shell by adding:
/usr/local/bin/fish
to your list of shells located in/etc/shells
. You can manually start Fish by running:chsh -s /usr/local/bin/fish
. - In iTerm2, go to Preferences->Profile->General and select Command with the following path:
/usr/local/bin/fish -l
. This will start Fish when you open iTerm2 without needing to manually start it.
Customization
- You can edit some of the visual and functional configurations for your Fish shell by using it's built-in UI. Run the command:
fish_config
and you will be able to adjust the colors, prompt, functions, and variables.
Hints
Setting Environment Variables
set -x key value
Written by Justin Livingston
Related protips
2 Responses
I've been using fish for a year now, and LOVE it.
One useful trick: set -xU key value
Then it's permanent across all fish shells present and future.
over 1 year ago
·
Is fish better than ZSH?
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Tags
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#