Skip to content

Fish shell

September 29, 2023
February 18, 2016

fish shell
fish - ArchWiki

Fish shell cheatsheet

Fish shell playground | rootnroll
jorgebucaran/awesome-fish: A curated list of packages, prompts, and resources for the fish shell.
jorgebucaran/fish-cookbook: Tips and recipes for fish, from shell to plate.
The fish Shell
Fish shell notes
fish shell scripting manual | developerlife.com

Tips and Tricks

Use Starship: Cross-Shell Prompt instead
jorgebucaran/awsm.fish: A curation of prompts, plugins & other resources for Fish. 🐚
IlanCosman/tide: 🌊 The ultimate Fish prompt.

fish for zsh users
friendly interactive shell - Wikiwand
ENV_VAR=x command is unsupported; use env ENV_VAR=x command instead.

Auto-escape pasted text · Issue #2188 · fish-shell/fish-shell · GitHub Shift+Ctrl+V
Add support for bracketed paste · fish-shell/fish-shell@db63be7 · GitHub
bracketed paste mode

When An Alias Should Actually Be An Abbr | sean henderson

Global alias a la ZSH · Issue #1963 · fish-shell/fish-shell

Why Fish

Fish featured on Ars:
Fish: the friendly interactive shell | Ars Technica
The fish shell is awesome - Julia Evans
Why you should give a chance to Fish shell - DEV Community 👩‍💻👨‍💻
FISH (Friendly Interactive Shell) by Bash Boomer - YouTube
The Fish Shell
Why I'm Hooked on Fish Shell (and How to Set it Up Right)

Fish defaults

fish-shell/share/functions at master · fish-shell/fish-shell /usr/share/fish/functions

/usr/share/fish/

Debugging

fish -d 3 script.fish

Debugging — fish-shell documentation breakpoint
fish_breakpoint_prompt - define the prompt when stopped at a breakpoint — fish-shell documentation

Add support for fish_trace variable to trace execution by ridiculousfish · Pull Request #6255 · fish-shell/fish-shell set fish_trace 1
Add a way to toggle debug mode in Fish shell · Issue #3427 · fish-shell/fish-shell

History

history - Show and manipulate command history — fish-shell 3 documentation

History search is simply typing and Up, no more Ctrl+R by default.
But you can bind manually, see #fzf key bindings

Parameter expansion

Wildcards/globbing — fish-shell documentation

Command substitution — fish-shell documentation
(cmd)

Brace expansion — fish-shell documentation
cp file{,.bak} backup file

Variable expansion — fish-shell documentation

Index range expansion — fish-shell documentation

Process substitution

bin2 <(bin1) becomes bin2 (bin1 | psub)

psub - perform process substitution — fish-shell documentation

shell - Fish error while trying to run command on mac - Stack Overflow

Functions

Variable scope — fish-shell documentation

Autocomplete

Fish will automatically generate autocompletion from man pages for supported commands, written to ~/.local/share/fish/generated_completions/.
Use fish_update_completions to update.

Fish also includes completion of popular packages, located.

Tutorial — fish-shell documentation
To accept autocompletion, press Right or Ctrl+F
To accept autocompletion to word boundary, use Alt+Right or Alt+R

Writing your own completions — fish-shell documentation
complete - edit command specific tab-completions — fish-shell 3 documentation
A guide for fish shell completions - Fábio Antunes - Medium

cli/docker.fish at master · docker/cli
fish-shell/share/completions at master · fish-shell/fish-shell also at /usr/share/fish/completions

Fisher

jorgebucaran/fisher: A package manager for the fish shell.
jethrokuan/fzf: Ef-🐟-ient fish keybindings for fzf
halostatue/fish-fzf: FZF Helpers for Fish
laughedelic/pisces: ♓️ Fish shell plugin that helps you to work with paired symbols in the command line

setomits/venv-fish
virtual environments with python and fish
Automatically activate/deactivate virtualenv in fish shell

b4b4r07/enhancd
nickeb96/puffer-fish
jorgebucaran/autopair.fish

curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher

fisher install jorgebucaran/nvm.fish
fisher install PatrickF1/fzf.fish
fisher install laughedelic/pisces
fisher install setomits/venv-fish
fisher install jethrokuan/z

Other package manager

I prefer fisher over these

oh-my-fish/oh-my-fish: The Fish Shell Framework
packages-main/packages at master · oh-my-fish/packages-main

danhper/fundle: A minimalist package manager for fish shell

Plugins

fish-plugins · GitHub Topics

edc/bass: Make Bash utilities usable in Fish shell

jorgebucaran/nvm.fish: Node.js version manager lovingly made for Fish. I'm using this native Fish script, the syntax is a bit different from the official one
brigand/fast-nvm-fish: a wrapper around node version manager for fish shell with good performance

danhper/fish-ssh-agent

Directory history

Quickly Navigate Through Directory History In Fish Shell - OSTechNix cdh, prevd, nextd

Fuzzy cd for fish shell using fzf
wting/autojump: A cd command that learns - easily navigate directories from the command line
autojump(macOS) + fzf for fish shell
sjl/z-fish: A fork of http://github.com/rupa/z to port it to the Fish shell.

fzf key bindings

/usr/share/fish/vendor_functions.d/fzf_key_bindings.fish

PatrickF1/fzf.fish: Augment your fish command line with fzf key bindings.
halostatue/fish-fzf: FZF Helpers for Fish + jethrokuan/fzf: Ef-🐟-ient fish keybindings for fzf