So far, my favorite shell.

[DRAFT Talking points]

Autocomplete, History, mind-reading

Abbreviations

more readable by yourself in the future and for others looking at screen recordings / youtube videos.

The Bad

Fish is not posix compliant as the “fish scripting” languages is entirely different from bash. Luckily, this isn’t the end of the world as outside of config you don’t really need to use fish and can just keep using bash (with shellcheck).

If you need the script to integrate with fish e.g. the script exports some functions or variables, you can use bass. e.g.

bass source $HOME/.config/fish/is_wsl.sh

In this case is_wsl exports a variable isWSL which i can use in both my bash/zsh and fish scripts to detect if I’m running in WSL. (the script also runs a fix for vscode WSL)

Cool but Obscure/niche features

Terminal Math: I often would use the node repl for quick maths in the terminal, but you can somewhat do this in fish too using the math built in. One caveat is you can’t use * since that’s for path globbing but you can use x (but you do need to surround that with spaces).

Count list: e.g. count $PATH counts the paths inside PATH.

Previous and next directory: prevd and nextd commands are effectively an “undo” and “redo” of the cd command. Useful for when you change using absolute paths or just long paths.

The best part though is that they have keybinds:

  • prevd: alt +
  • nextd: alt +

Quick Open Editor: alt + e

Sudo last command: alt + s


Resources Used