Skip to content

Instantly share code, notes, and snippets.

@e-roux
Last active November 30, 2019 13:42
Show Gist options
  • Save e-roux/855862685bfc2aa11d432e1194f947ae to your computer and use it in GitHub Desktop.
Save e-roux/855862685bfc2aa11d432e1194f947ae to your computer and use it in GitHub Desktop.
Memo: Fish shell

Fish

fish is a smart and user-friendly command line shell for Linux, macOS, and the rest of the family.

  • Autosuggestions
  • Web Based configuration
  • ...

Installation

sudo apt install fish curl

Oh My Fish

Oh My Fish provides core infrastructure to allow you to install packages which extend or modify the look of your shell.


Installation

curl -L https://get.oh-my.fish > install
fish install --path=~/.local/share/omf --config=~/.config/omf

Configuration

Oh My Fish ships with a web interface for configuration. Type fish_config in terminal for lauching a web browser.

Commands

  cd Change to root or package directory.
  channel Get or change the update channel.
  describe Show information about a package.
   destroy Uninstall Oh My Fish.
   doctor Troubleshoot Oh My Fish.
   help Shows help about a command.
   install Install one or more packages.
   list List installed packages.
   new Create a new package from a
   reload Reload the current shell.
   remove Remove a package.
   repositories Manage package repositories.
   search Search for a package or theme.
   theme Install and list themes.
   update Update Oh My Fish.
   version Display version and exit.

Theme

bobthefish is a style, Git-aware fish theme optimized for awesome.

bobthefish

Installation

Managed by Oh My Fish:

omf install bobthefish

You will need a [Powerline-patched font][patching] for this to work, unless you enable the compatibility fallback option:

set -g theme_powerline_fonts no

[I recommend picking one of these][fonts]. For more advanced awesome, install a [nerd fonts patched font][nerd-fonts], and enable nerd fonts support:

sudo apt-get install fonts-powerline
set -g theme_nerd_fonts yes

Nerd fonts

Nerd fonts

Install Fura Code

curl -L https://github.com/ryanoasis/nerd-fonts/releases/download/v2.0.0/Monofur.zip -o /tmp/Monofur.zip && \
unzip -d ~/.fonts/ /tmp/Monofur.zip

Renew font cache

fc-cache -vf

Specific options for VS code in settings.json

"terminal.integrated.fontFamily": "FuraCode Nerd Font"

Ressources

Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome, i3 and Qtile.

Ex. in vi Mode-dependent highlighting
Normal mode Insert mode Visual mode Replace mode

powerline-shell is a prompt generator for Bash, ZSH, Fish, and tcsh.

Bash git prompt is a port of the git prompt for zsh.

Oh My Zsh is an open source, community-driven framework for managing zsh configuration.

#!/bin/bash
curl -L https://get.oh-my.fish > install
fish install --path=~/.local/share/omf --config=~/.config/omf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment