Samstag, 26. Juni 2010

Current git branch in a zsh prompt

I've looked for hours to find a way to just display the current git branch in the prompt of my zsh shell and I've come to this more or less understandable solution which should work with any common VCS available:

autoload -U colors && colors
autoload -Uz vcs_info

zstyle ':vcs_info:*:prompt:*' formats "$VCSPROMPT" "[%b]"

precmd() {
vcs_info 'prompt'

if [ -n vcs_info_msg_0_ ]; then

PROMPT=$'%F{green}%~#%f '

The result is that the current working directory is shown on the left side and the name of the branch in braces on the right. I could probably configure it in a way which shows me a lot more information but all I want is a little reminder about the branch I'm currently in.

Freitag, 18. Juni 2010

The current state of sphinx-py3k

I have not made a report in quite some time. I know I am supposed to make weekly reports but up until now I have not found anything really worth reporting at least since the last report. So what happend that you can find here one now?

I fixed every error in the test suite, which were about 55, now there are only 7 failures left. They might be even harder to fix then a usual error but I do not think this is going to be much of a problem.

What is a real problem are doctests. Currently there is no way of converting those automatically and even if there was there are certain problems like the change in the results. The representation of the string types has changed and some functions in the math module returns ints instead of floats were applicable and if you look around you can probably find more examples. A converter cannot deal with these changes easiely. I have some ideas on the problem but I will have to talk to my mentor about a solution.