mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-12-15 19:30:51 +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" ]
|
||||
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 " "
|
||||
|
Loading…
Reference in New Issue
Block a user