Dotfiles icon indicating copy to clipboard operation
Dotfiles copied to clipboard

Git branch in shell

Open Tina-otoge opened this issue 6 years ago • 0 comments

The current shell should display the currently selected branch.

Targeted shells:

  • zsh
  • bash (optional)

Features wanted

  • display branch
  • display changes (optional)

Example

~/Repositories/skielred/Dotfiles (master) 
[user@domain] % ls

bash/     vim/      zsh/
3 directories

Special notes

Displaying the current branch should not affect the starting column for user input. Either use RPROMPT or display it on a new line.

~/not/in/a/repo
[user@domain] % cd ~/Repositories/skielred/Dotfiles

~/Repositories/skielred/Dotfiles
[user@domain] (master) % cd vim

This is not ok!! Avoid changing the starting column for user input as much as possible, as it decreases readability of commands history drastically!!

Tina-otoge avatar Aug 16 '18 13:08 Tina-otoge