Tina-otoge / Dotfiles

My Linux desktop environment
16 stars 0 forks source link

Git branch in shell #2

Open Tina-otoge opened 6 years ago

Tina-otoge commented 6 years ago

The current shell should display the currently selected branch.

Targeted shells:

Features wanted

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!!