Skip to content

Instantly share code, notes, and snippets.

@clsource
Created February 22, 2020 15:13
Show Gist options
  • Save clsource/4bd6eff7a91385ebdc25d36bf932ee7a to your computer and use it in GitHub Desktop.
Save clsource/4bd6eff7a91385ebdc25d36bf932ee7a to your computer and use it in GitHub Desktop.
Setup Fish in MacOS

Install Homebrew

/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install fish

brew install fish

Set Default Shell

https://stackoverflow.com/questions/453236/how-to-set-my-default-shell-on-mac

sudo sh -c 'echo /usr/local/bin/fish >> /etc/shells'
chsh -s /usr/local/bin/fish

Install Oh My Fish

curl -L https://get.oh-my.fish | fish

Install Bob the fish + Nerd Fonts

https://github.com/oh-my-fish/theme-bobthefish https://www.nerdfonts.com/

omf install bobthefish
brew tap homebrew/cask-fonts
brew cask install font-hermit-nerd-font
set -U theme_nerd_fonts yes

Change LS Colors

https://stackoverflow.com/questions/25560595/how-do-i-change-the-colour-of-directory-listings-with-oh-my-fish

set -Ux LSCOLORS gxfxbEaEBxxEhEhBaDaCaD

Change Terminal Font

This step is done in preferences of each terminal. Select Hermut or the preferred nerd font. Check https://iterm2.com/ for an awesome terminal option.

Customize Fish Config

execute fish_config to open the web browser config for fish

fish_config

Optional: Set fortune

brew install fortune
vim ~/.local/share/omf/themes/bobthefish/fish_greeting.fish
function fish_greeting -d "What's up, fish?"

   set_color $fish_color_autosuggestion
   echo ""
   printf "🔮 "
   fortune -a
   echo ""

   set_color normal
end

Optional: Set VSCode Terminal

https://code.visualstudio.com/

in settings.json

“terminal.integrated.shell.osx”: “/usr/local/bin/fish”,
“terminal.integrated.fontSize”: 14,
“terminal.integrated.fontFamily”: “Hermut Nerd Font”

References

https://medium.com/tuannguyendotme/set-up-the-fish-shell-on-mac-step-by-step-6a77bcb2687c https://mvolkmann.github.io/fish-article/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment