I'm running ubuntu 13.04 and I have a PS1 like this
PS1="\$(__git_ps1 '(%s) ')\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "
And I'm used to use the vi mode of bash with set -o vi
.
However, if $PWD
is somewhere in the tree in a git root and I press ESC+/
to search, the indent gets fucked up. With each directory in the tree, it's getting worse.
The results of the search are printed "somewhere", but not where they are supposed to be.
Outside a git root, directly in the git root or without the $(__git_ps1 '(%s) ')
it works perfectly.
ESC+k
for is working, no matter where I am.
Here are some examples:
(master) flx@t420:~/dev/somegitproject/subdir/subdir$ [press ESC+/]
(master) flx@t420:~/dev/somegitproject/subdir/subdi[type your search here]
(master) flx@t420:~/dev/somegitproject/subdir/subdir/subdir/subdir$ [press ESC+/]
(master) flx@t420:~/dev/somegitproject/subdir/subdir/subdi[type your search here]
Everything is fine:
(master) flx@t420:~/dev/somegitproject$ [press ESC+/]
(master) flx@t420:~/dev/somegitproject$ /[type your search here]
I just noticed, that printing the search results in broken in a git root to:
(master) flx@t420:~/dev/somegitproject$ [press ESC+/]
(master) flx@t420:~/dev/somegitproject$ /whateve[enter]
(master) flx@t420:~/dev/somegiwhateve tproject$ whatevercommand
In a directory without git, it's working as expected:
(master) flx@t420:~/dev$ [press ESC+/]
(master) flx@t420:~/dev$ /whateve[enter]
(master) flx@t420:~/dev$ whatevercommand
Any idea how to fix this. It's very annoying.
The funny part is, this very same PS1 worked on my old desktop running an old ubuntu installation updated to 13.04. But it is broken in this fresh installation.