Page MenuHomeDevCentral

Add a VCS informative prompt to `arc shell`
Open, WishlistPublic


Install Steve Losh zsh prompt or nojhan Liquidprompt to offer a shell with visual clues in the prompt.

The Cloud9 containers are especially nice and minimalist in this aspect.

Information needed

  • The name of the branch (mandatory)
  • The type of VCS (facultative)
  • Some indicators when a merge isn't completed (nice to have)

Done for Git. Still to do for Mercurial and SVN.

Event Timeline

Liquidprompt doesn't seem to print correctly Git information as root.

For Git, we can use

It requires to set the following prompt:

To add to .bashrc
PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '

Options to test

Some options indicate relevant information before arc diff or arc land:

To add to .bashrc

zsh + starship looks a good solution too, but it's not packaged for Debian.

rOPS provisions starship through a package for FreeBSD and snap for Linux.