# Four weeks of fish shell

At the SoCraTes conference I attended a demo of the fish shell and was so impressed that I pledged to use fish instead of zsh as my main shell for 4 weeks. This is the result of the experiment and contains my collected experiences.

## Fish is awesome

I really like fish and will continue to use it. The syntax highlighting of the the commands gives immediate feedback (unknown commands are shown in red) and the command autosuggestions are a real time saver. There are even more features I like:

• Word navigation with Alt+Left and Alt+Right.
• Very pretty, informative prompts, with easy definition of “right prompt”.
• Prompt definitions are readable functions and not a jumble of escape characters
• Configuration lives in a directory (~/.config/fish) instead of one single file. It is modular and can stretch multiple files, making it easy to keep it under source control.

and commandline -- $result end  The awk command is not perfect because it will mangle multiline commands, but overall the function works very well. It’s storing every command as a key in the hash a, counting up its value whenever it encounters the command and only printing the command when the counter is zero. Suggestions for improving the parsing of multiline commands are welcome. In the future I’ll try to bind the function to Alt+Z (or rather Esc+Z on my Mac where Esc takes the role of the Alt key by default). ## My current setup I’m using oh-my-fish as a “package manager” for plugins and themes, but at the moment I’m only using the bang-bang plugin for repeating the last argument/command. I use bobthefish as my theme. Using such a fancy prompt needs to have special fonts in macOS Terminal. I have replaced the default “Menlo” font with “Meslo LG S DZ Regular for Powerline” from the Powerline fonts repository. “LG S” is for “small line gap”, resembling the original Terminal font as closely as possible. I’ve configured my Terminal to accept Alt+Up keystrokes to insert the last argument. With this setting I will probably use the bang-bang plugin less and less. I decided to go with oh-my-fish because I already has good experiences with oh-my-zsh. But oh-my-fish is more of a “spiritual port” than a 1:1 clone of oh-my-zsh. oh-my-fish even has a handy CLI tool to manage themes and plugins where oh-my-zsh solely relies on editing configuration files. ## Some minor pain points • I have to get used to using (somecommand) instead of $(somecommand) or somecommand. Especially when copying Docker commands from the web or from colleagues, it’s (pwd) instead of \$(pwd).
• I still have to fully understand key bindings, especially when needing to distinguish between vi mode and “normal mode”.
• I have to memorize how to disable vi mode: fish_default_key_bindings