Skip to content

mattmc3/fishconf

Repository files navigation

fishconf

My fish shell configuration

Installation

# get the repo
test -d ~/.config/fish && mv ~/.config/fish ~/.config/fish.bak
git clone git@github.com:mattmc3/fishconf ~/.config/fish
fish

# select color scheme - I like Nord or Tomorrow Night
fish_config

Performance

A snappy shell is very important to me. My config includes a benchmark function that runs fish 10 times and presents the timings.

The latest benchmark run shows that we load a new shell pretty fast.

$ # MacBook Air (M3, 2024)
$ set fprof (mktemp)
$ fish --profile-startup=$fprof -c exit
$ awk 'NR==1 || $3==">"{print}' $fprof | string replace $HOME '~'
$ rm $fprof
Time  Sum   Command
238   3042  > builtin source /opt/homebrew/Cellar/fish/3.7.0/share/fish/config.fish
11    11    > builtin source /opt/homebrew/etc/fish/config.fish
141   8047  > builtin source ~/.config/fish/config.fish

$ for i in (seq 1 10); /usr/bin/time fish -i -c exit; end
        0.02 real         0.01 user         0.01 sys
        0.01 real         0.01 user         0.00 sys
        0.01 real         0.00 user         0.00 sys
        0.01 real         0.00 user         0.00 sys
        0.01 real         0.00 user         0.00 sys
        0.01 real         0.00 user         0.00 sys
        0.01 real         0.00 user         0.00 sys
        0.01 real         0.00 user         0.00 sys
        0.01 real         0.00 user         0.00 sys
        0.01 real         0.00 user         0.00 sys

You can also profile fish's startup with the following command:

fish --profile-startup=$__fish_config_dir/fishprof.txt -c "exit"

Releases

No releases published

Packages

No packages published

Languages