Add commit hash to command line prompt in zsh, one line in .zshrc
Customize Your ZSH Prompt to Display the Last Commit's SHA
I enjoy customizing my terminal, and one feature I find particularly useful is displaying the last commit's SHA directly in the co