mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-12-16 11:51:13 +01:00
meta: Add git tag information to fish prompt
Now that I understand how tags work in git, keeping track of the current revision number with the shell prompt is actually very useful.
This commit is contained in:
parent
f6e2997e28
commit
571c03bb55
@ -23,6 +23,13 @@ function fish_prompt
|
|||||||
if [ "$branch" ]
|
if [ "$branch" ]
|
||||||
set_color normal; echo -n " on "
|
set_color normal; echo -n " on "
|
||||||
set_color yellow; echo -n "$branch"
|
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
|
end
|
||||||
|
|
||||||
set_color normal; echo -n " "
|
set_color normal; echo -n " "
|
||||||
|
Loading…
Reference in New Issue
Block a user