質問

Here is my bash prompt: bash

Here is the PS1 that generates that

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]`__git_ps1`    \$ '

Now, here is the stuff I understand:

  • $debian_chroot - used for su & sudo
  • u - user
  • h - host
  • rest chars like \033 are for colors.

What I don't understand is what is generating space AFTER rails and BEFORE (master)? What character does that? I would like to remove that space.

役に立ちましたか?

解決

The __git_ps1 function is generating it. Edit the file the function is defined in.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top