Skip to content

Instantly share code, notes, and snippets.

View eakst7's full-sized avatar

Ed King eakst7

View GitHub Profile
@britishtea
britishtea / fish_right_prompt.fish
Last active February 17, 2024 22:20
My right prompt for the fish shell.
function fish_right_prompt -d "Write out the right prompt"
set -l exit_code $status
set -l is_git_repository (git rev-parse --is-inside-work-tree 2> /dev/null)
set -l max_shlvl 1; and test "$TERM" = "screen"; and set -l max_shlvl 2
# Print a fork symbol when in a subshell
if test $SHLVL -gt $max_shlvl
set_color yellow
echo -n "⑂ "
set_color normal