Informative git prompt

Informative Git Prompt for Fish

Project maintained by mariuszs Hosted on GitHub Pages — Theme by mattgraham

Informative GIT Prompt for Fish shell

This prompt is a port of the Informative git prompt for bash which is based on Informative git prompt for zsh. Original idea is from blog post A zsh prompt for Git users.


The prompt may look like the following:


Prompt Structure

By default, the general appearance of the prompt is:

(<branch> <branch tracking>|<local status>)

The symbols are as follows:


  1. Move the file into ~/.config/fish/functions.
  2. Configure your prompt in~/.config/fish/ For this you have to define function fish_prompt. Example function is inside - simply copy is enough.
  3. Go in a git repository and test it!


Example configuration (

function fish_prompt --description 'Write out the prompt'

  set -l last_status $status

  set_color $fish_color_cwd
  echo -n (prompt_pwd)
  set_color normal


  if not test $last_status -eq 0
    set_color $fish_color_error

  echo -n ' $ '