Mastodon hachyterm.io

Fish shell is my favorite shell. It’s awesome.

Fish comes with useful features out of the box. For example, excellent auto-completion and syntax highlighting make my life easier. Fish is a joy to use.

What Is a Shell?

From technopedia:

A shell is software that provides an interface for an operating system’s users to provide access to the kernel’s services.

On Unix-based or Linux-based operating systems, a shell can be invoked through the shell command in the command line interface (CLI), allowing users to direct operations through computer commands, text or script.

Shells also exist for programming languages, providing them with autonomy from the operating system and allowing cross-platform compatibility.

Installation For Arch Linux

I recommend using fish as the interactive shell. This method is less disruptive, as it doesn’t eliminate the standard bash shell completely.

Install fish with pacman -S fish.

Modify ~/.bashrc to drop into fish. Add this line:

exec fish

When you open your terminal, it will automatically drop into fish.

Installation For Other Systems

The official website has instructions for several operating systems. If you use MacOS, you should check out Flavio Copes’s article on fish.

Install a Package Manager

  • Fisher - Minimal, fast and reliable package manager.
  • Fundle - config.fish-based package manager inspired by vundle.
  • Oh My Fish! - Shell configuration framework and package manager all-in-one.

I prefer Fisher, as it offers everything I need from a package manager.

Plugins I Like

Fish works sufficiently without any plugins. That said, I installed some utilities for convenience.

Theme: l

l is a minimalist prompt that offers essential information like the current git branch, but not much else.

fisher install oh-my-fish/theme-l

bax

bax allows you to run bash scripts in fish. Fish is not POSIX-compatible. That means, that some commands don’t translate 1-to-1 to fish.
With bax, you can run normal bash commands by prepending the command with bax.

fisher install jorgebucaran/fish-bax

Use it like that:
bax "source ~/.nvm/nvm.sh --no-use; nvm use latest".

fish-ssh-agent

Utility functions to start the ssh agent. I can highly recommend installing fish-ssh-agent.

fisher install danhper/fish-ssh-agent

gitnow

gitnow is a wrapper around git.

fisher install joseluisq/gitnow@2.1.1

PJ

Easily jump between your favorite directories from everywhere with pj:

fisher install oh-my-fish/plugin-pj

Then set your project folders:

set -U PROJECT_PATHS ~/Coding/Projects ~/home

plugin-license

With plugin-license you can quickly create a license for your project.

fisher install oh-my-fish/plugin-license

Now create a license:

license mit >> LICENSE.txt

upto

Move to the parent folder with ease using the plugin upto:

fisher install markcial/upto

virtualfish

virtualfish is a wrapper around virtualenv for Python dependency management.

Installation instructions are here or here.

z

z tracks your most used directories.

fisher install jethrokuan/z

Example usage:
z foo goes to the directory best matching foo.

Further Reading