Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please include current Git branch in the Terminal prompt #48

Closed
jankeromnes opened this issue Aug 31, 2018 · 1 comment
Closed

Please include current Git branch in the Terminal prompt #48

jankeromnes opened this issue Aug 31, 2018 · 1 comment
Labels
type: feature request New feature or request

Comments

@jankeromnes
Copy link
Contributor

Current prompt:

gitpod /workspace/definitely-gp $

Expected prompt:

gitpod /workspace/definitely-gp (master) $

Since __git_ps1 seems to be installed (by default alongside git), this could be achieved like so:

PS1='\[\033[01;32m\]\u\[\033[00m\] \[\033[01;34m\]\w\[\033[00m\]$(__git_ps1 " (%s)") $ '

(source but with \u \w instead of \u@\h:\w to imitate the current gitpod prompt)

@svenefftinge
Copy link
Member

svenefftinge commented Aug 31, 2018

We don't do that on purpose, because it does not update, if I change the branch outside the terminal.
The branch information is shown in the status bar on the bottom left.

screen shot 2018-08-31 at 23 37 33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants