From 624fa96d4e72957f6d2424104709018a8e269697 Mon Sep 17 00:00:00 2001 From: Gwen Lofman Date: Mon, 16 Sep 2019 20:21:26 -0400 Subject: [PATCH] Add fish shell instructions to README --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index ca87385..1b7920b 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,21 @@ precmd() { print -rP "$(glit "$GIT_FMT" -b -e "$PS1_FMT")" } PROMPT="%# " ``` +### fish + +Replace your `~/.config/fish/functions/fish_prompt.fish` file with: + +```fish +function fish_prompt + # format used in git repositories + set git "#y('"(prompt_pwd)"')' '\[#c(#*(\b)\B(#~('@'\{\+\-})))]' '\{\{#g(\M\A\R\D)#r(\m\a\u\d)}}'\nāžŸ '" + # fallback format used outside of git repositories + set ps1 "#y('"(prompt_pwd)" ')'āžŸ '" + + echo -e (glit $git -e $ps1) +end +``` + # Customizing your format Glitter provides a flexible expression language which is easy to use and easy to prototype with: