Skip to content

Conversation

@daviewales
Copy link

The PS1 line took forever (~1s) to display in bzr branches, because bzr is slow.

I increased the speed by eliminating the call to bzr, and replacing it with a modified bash script which I found here:
http://unix.stackexchange.com/questions/6463/find-searching-in-parent-directories-instead-of-subdirectories

The PS1 line took forever (~1s) to display in bzr branches, because bzr is slow.

I increased the speed by eliminating the call to bzr, and replacing it with a modified bash script which I found here:
http://unix.stackexchange.com/questions/6463/find-searching-in-parent-directories-instead-of-subdirectories
bash/bash_vcs.sh Outdated
bzr_root=${bzr_root%/*}
if [ "$bzr_root" = "" ]; then break; fi
done
base_dir=$bzr_root || return 1
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line doesn't quite work yet. I haven't had time to fix it.
At the moment, this is a regression, because it shows (bzr) even when you are not a a bzr directory.

This is because $bzr_root can never return a non zero exit status, because it is not a function.

I don't know quite enough bash to fix this, and don't have time to learn at the moment.

The previous commit didn't know what to do outside of a bzr repo. This fixes it, and makes it a bit faster.
@daviewales
Copy link
Author

This version should work now.

The bzr part should be a lot quicker too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant