tide
tide copied to clipboard
How to add git SHA in the end of git status info
Hello,
How can I add the git SHA in the end of the git status information section?
Can you point me to the code or the documentation?
Thanks!
How it looks, should be easy to tweak it to your liking
This is how I did it:
Please add these changes at the bottom of the original ~/.config/fish/functions/_tide_item_git.fish
(consider backing it up, it will be overridden next time tide updates)
set -l git_info (set_color white; echo -ns $location ' ('$hash')'
set_color $tide_git_color_operation; echo -ns ' '$operation ' '$step/$total_steps
set_color $tide_git_color_upstream; echo -ns ' ⇣'$behind ' ⇡'$ahead
set_color $tide_git_color_stash; echo -ns ' *'$stash
set_color $tide_git_color_conflicted; echo -ns ' ~'$conflicted
set_color $tide_git_color_staged; echo -ns ' +'$staged
set_color $tide_git_color_dirty; echo -ns ' !'$dirty
set_color $tide_git_color_untracked; echo -ns ' ?'$untracked)
_tide_print_item git $_tide_location_color$tide_git_icon' ' $git_info