Skip to content

Instantly share code, notes, and snippets.


Manish Kapoor kapoormanish

View GitHub Profile
kapoormanish / Git branch name in Fish shell prompt
Last active Oct 22, 2018
Showing current git branch in fish shell prompt.
View Git branch name in Fish shell prompt
# Unlike bash shell, to display your prompt, fish executes a function with the name fish_prompt,
# and its output is used as the prompt. So in order to add custom text to the prompt,
# we need to override this method (fish_prompt) in fish config file (for me, it is .config/fish/
# Here is the simple implementation of fish_promt that shows current git branch name in the prompt.
function fish_prompt
set_color purple
set_color FF0