From f75fa2dfef09053aa0d2e3e30fd4f214853cf390 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Sun, 23 Aug 2020 18:09:32 +0200 Subject: [PATCH] fish: add fish prompt --- .config/fish/functions/fish_prompt.fish | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .config/fish/functions/fish_prompt.fish diff --git a/.config/fish/functions/fish_prompt.fish b/.config/fish/functions/fish_prompt.fish new file mode 100644 index 0000000..0958f90 --- /dev/null +++ b/.config/fish/functions/fish_prompt.fish @@ -0,0 +1,18 @@ +function fish_prompt --description 'Write out the prompt' + set -l last_status $status + + set_color $fish_color_cwd + echo -n (pwd) + set_color normal + + __terlar_git_prompt + + if not test $last_status -eq 0 + set_color $fish_color_error + echo -n " [$status]" + set_color normal + end + + echo -n '➤ ' + set_color normal +end