Skip to content

Releases: fourpastmidnight/custom_git_prompt

Release 28 October 2015

30 Oct 01:18
Compare
Choose a tag to compare

Release Notes

  • Setting your shell (bash only, for now) prompt in a manner very similar to how you setup your git prompt using __git_ps1 from git-prompt.sh.
  • Enabling you to use well-defined environment variables for setting the formatting and coloring of your shell prompt.
  • sh-prompt.sh calls git-prompt.sh to ensure both your shell prompt and git repository information are formatted and colored as desired.
  • sh-prompt.sh function __sh_ps1 also allows you to set your shell prompt window terminal title (xterm only at this time).
  • Allows you to define the text to be used for displaying git branch state information (e.g. unstaged/staged commits, untracked files and stashed changesets).
  • Allows you to define the colors for each of the different branch states that are displayed.
  • Allows you to specify the order in which branch state information is displayed.
  • Allows you to always show branch state information using a "clean color" format.
  • Allows you to define the order in which branch information is displayed in your prompt (e.g. short sha, branch name, and branch state).
  • Allows you to show the short sha.
  • Allows you to show the count of staged changes, unstaged changes, and untracked files. WARNING: This is a costly operation and should only be enabled for small repositories with small amounts of changes. For example, it's even a bit heavy for this very small repository. Some people want it; it's generally not useful.
  • Allows you to define how upstream branch information is displayed.
  • If your terminal supports UTF-8, you can use Unicode fonts to define the various state "icons".

Known Issues

  • Only tested on bash shell.
  • Setting the title is known only to work for xterm-based terminals. For example, this was developed using mintty v2.0.3.
  • No ability to set the color of upstream information or determine where it is displayed in the branch information presented.
    • This is planned to be addressed in a future release within the next few days.