rcjavier / iterm-fish-fisher-osx

Complete guide and Bash script to install Command Line Tools + Homebrew + iTerm2 + Fish Shell + Fisher + Plugins for development purposes

Home Page:https://ghaiklor.github.io/iterm-fish-fisher-osx/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

iTerm 2 + Fish Shell + Fisher + Themes\Plugins

This guide is targeted for those, who wants to have a nice UI in the terminal with the rich features.

Please, raise your issue if something strange happened. I'd like to improve this script, so it could work without any errors during the installation.

The Problem

Every time, I've re-installed my operating system, I spend around ~30 minutes to set up my terminal environment again. I bored of it, so I decided to make a list of all actions I doing, when setting it up, alongside with automatic script to do so, and share it with you all.

Screenshots & GIFs

They are available here.

Key Features

The script installs things related to terminal environment only:

  • Installs Command Line Tools, Homebrew, iTerm2, Fish, Fisher.
  • Installs Material Design color preset for iTerm2 and patched Meslo Nerd Font.
  • Theme bobthefish, which is based on popular agnoster.
  • Completions for brew, git, ./node_modules/.bin and so on, so on...

Installs a lot of useful plugins for Fish Shell:

  • bass plugin that makes easy to use utilities written for Bash Shell in Fish Shell.
  • battery function shows current level of the battery.
  • Plugin done that notifies you when the process is finished. i.e. you can run npm install command and switch back into your browser. When npm install is done, you will get OSX notification.
  • errno-grep function allows to search POSIX error codes and their messages.
  • fzy plugin adds a hotkey Ctrl+R that allows to show and search in your command history.
  • license function for generating GitHub license in your current folder.
  • pj function allows to easily jump between your favorite directories. It installs with configured ~/Library/Projects folder, so you can jump to any of your projects by calling pj <PROJECT_FOLDER_NAME>.
  • shark function build sparklines right in your terminal.
  • upto function gets you to a parent folder. I.e. you're inside a/b/c/d/e/, calling upto b will navigate you into a/b.
  • z function shows the most recent and frequently visited folders, so you can go there without typing cd everytime.

How To Setup

You can achieve the same setup as mine, by manually setting up the environment (following the guide below) or automatically by executing the installer install.sh.

Automatic Installation

Highly recommended to run the script below under Bash session in default Terminal.app. I can not guarantee proper installation outside of Terminal.app + Bash Shell.

$ bash <(curl -s https://raw.githubusercontent.com/ghaiklor/iterm-fish-fisher-osx/master/install.sh)

Manual Installation

iTerm2

Install iTerm 2

  • Download and install iTerm2 (it has better color fidelity than the built in Terminal).
$ brew cask install iterm2

Install Color Scheme

Get the iTerm color settings:

Just save it somewhere and open the file(s). The color settings will be imported into iTerm2. Apply them in iTerm through iTerm -> Preferences -> Profiles -> Colors -> Load Presets. You can create a different profile, other than Default if you wish to do so.

Install Patched Font

Open the downloaded font and press "Install Font".

Set this font in iTerm2 (iTerm -> Preferences -> Profiles -> Text).

  • Regular Font -> "Change Font"
  • Non-ASCII Font -> "Change Font"

Restart iTerm2 for all changes to take effect.

Fish Shell

Install Fish Shell

Download and install Fish Shell.

$ brew install fish
$ echo "/usr/local/bin/fish" | sudo tee -a /etc/shells
$ chsh -s /usr/local/bin/fish

Install Fisher

Fisher is a plugin manager for Fish Shell.

$ curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish

Install Themes and Plugins

fisher add igalic/anicode
fisher add edc/bass
fisher add oh-my-fish/plugin-battery
fisher add oh-my-fish/theme-bobthefish
fisher add laughedelic/brew-completions

brew install terminal-notifier
fisher add franciscolourenco/done

fisher add Shadowigor/plugin-errno-grep

brew install fzy
fisher add gyakovlev/fish-fzy

brew install grc
fisher add oh-my-fish/plugin-grc

brew install jq
fisher add oh-my-fish/plugin-license

fisher add oh-my-fish/plugin-node-binpath

fisher add oh-my-fish/plugin-pj
set -U PROJECT_PATHS ~/Library/Projects

fisher add fisherman/shark
fisher add Markcial/upto
fisher add jethrokuan/z

Find arbitrary unicode characters matching a search pattern. The last result match will be copied to your clipboard.

Bass makes it easy to use utilities written for Bash in fish shell.

OS X and Linux compatible battery utility.

A Powerline-style, Git-aware fish theme optimized for awesome.

Fish shell completions for Homebrew.

A fish plugin to automatically receive notifications when long processes finish.

Search for error codes, labels or messages via errno-grep.

fzy picks up history item and adds it to your shell. You need to execute manually.

Run fkill and type process you want to kill. fkill kills immediately. Press enter and process will be killed.

Generic Colouriser is yet another colouriser for beautifying your logfiles or output of commands.

Fish Shell plugin for generating GitHub licenses.

Automatically add node_modules/.bin to PATH when present.

pj allows you to easily jump between your favourite directories in a predictable manner. You tell pj where to look for your projects, and it will allow you to jump to them easily with tab completion. It even provides a convenient ability to open an editor in that directory from anywhere!

Shark is a sparkline generator for fish.

Gets you to a parent folder, heavily inspired by the plugin upto made by driv.

z tracks the directories you visit. With a combination of frequency and recency, it enables you to jump to the directory in mind.

License

MIT

About

Complete guide and Bash script to install Command Line Tools + Homebrew + iTerm2 + Fish Shell + Fisher + Plugins for development purposes

https://ghaiklor.github.io/iterm-fish-fisher-osx/

License:MIT License


Languages

Language:Shell 100.0%