mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-01-07 06:29:00 +01:00
fish: Remove git branch from prompt
This was cool but it breaks with the latest version of fish. Instead of trying to fix this I'd rather use a less hacky solution.
This commit is contained in:
parent
f125fbde38
commit
ca50b7646c
@ -1,5 +1,5 @@
|
|||||||
# New Start: A modern Arch workflow built with an emphasis on functionality.
|
# New Start: A modern Arch workflow built with an emphasis on functionality.
|
||||||
# Copyright (C) 2017-2018 Donovan Glover
|
# Copyright (C) 2017-2021 Donovan Glover
|
||||||
|
|
||||||
function fish_prompt
|
function fish_prompt
|
||||||
|
|
||||||
@ -10,7 +10,6 @@ function fish_prompt
|
|||||||
set_color magenta; echo -n "($PWD)"
|
set_color magenta; echo -n "($PWD)"
|
||||||
else
|
else
|
||||||
set pwd (basename $PWD)
|
set pwd (basename $PWD)
|
||||||
set branch (git branch ^/dev/null | sed -n '/\* /s///p')
|
|
||||||
|
|
||||||
if [ $PWD = "/home/$USER" ]
|
if [ $PWD = "/home/$USER" ]
|
||||||
set pwd "~"
|
set pwd "~"
|
||||||
@ -18,18 +17,6 @@ function fish_prompt
|
|||||||
|
|
||||||
set_color magenta; echo -n "$pwd"
|
set_color magenta; echo -n "$pwd"
|
||||||
|
|
||||||
if [ "$branch" ]
|
|
||||||
set_color normal; echo -n " on "
|
|
||||||
set_color yellow; echo -n "$branch"
|
|
||||||
|
|
||||||
set tag (git describe ^/dev/null | sed 's/-\w*$//')
|
|
||||||
|
|
||||||
if [ "$tag" ]
|
|
||||||
set_color normal; echo -n "/"
|
|
||||||
set_color cyan; echo -n "$tag"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
set_color normal; echo -n " "
|
set_color normal; echo -n " "
|
||||||
set_color red; echo -n "➤"
|
set_color red; echo -n "➤"
|
||||||
set_color green; echo -n "➤"
|
set_color green; echo -n "➤"
|
||||||
|
Loading…
Reference in New Issue
Block a user