This is a cheat sheet for configuring fish shell with the tide prompt on Linux.
prerequisites.
A word of caution: If you happen to run Ubuntu, its version of fish can be quite outdated to the point that tide won’t work with it.
-Install/Update fish shell to the latest by adding the ppa
sudo add-apt-repository ppa:fish-shell/release-3
sudo apt update
sudo apt install fish
install/overwrite from ppa version(If you find another distro with an outdated version of fish, let me know and I’ll update this page.)
running fish
/usr/bin/fish
run the fish shellchsh -s /usr/bin/fish
chsh “change shell” will change your default shell.Install ‘fisher’
The fish shell has its own plugin manager called ‘fisher’.
We will need fisher to install the tide prompt plugin.
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
sudo pacman -Sy fisher
Arch linux has fisher in its extra repoinstall the tide prompt
fisher install IlanCosman/tide@v6
run the configuration script
tide has it’s own built-in configuration script that will get you most of the way there, most of the time:
tide configure
If you’re happy with the results, congrats, you’re done!
color customization
context
“context” is the configuration name given to the part of the prompt that displays user@hostname. In a default tide config it is shown on the right-side prompt.
set -U tide_context_always_display true
Enables ‘context’ for local user sessions.set -U tide_context_color_default white
sets the foreground color of ‘context’ for local user sessionsset -U tide_context_color_root CE2029
sets the foreground color of ‘context’ for local root sessionsset -U tide_context_color_ssh yellow
sets the foreground color of ‘context’ for ssh connectionsset -U tide_context_bg_color black
sets the background color of ‘context’pwd
“pwd” stands for “print working directory” This is where we show the current working directory in the prompt. By default, it’s shown on the left-side.
We can change the background color of the pwd section by setting two universal environment variables:
set -U tide_pwd_bg_color yellow
(This sets the color of the outer “shapes”)set -U tide_pwd_color yellow
(Yes, this actually sets the background color)We can set the foreground colors of the parent directories with:
set -U tide_pwd_color_dirs 000000
(In this example I use a hex color instead)We can set the foreground colors of the active working directory with:
set -U tide_pwd_color_anchors brwhite
FishWith these settings you get something like /etc/systemd/system
Leave a Reply