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:
Donovan Glover 2018-12-17 15:40:26 -05:00
parent f6e2997e28
commit 571c03bb55
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -23,6 +23,13 @@ function fish_prompt
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 " "