Monthly Archives: December 2009

Show exit status of the last executed command in ZSH prompt

We recently stumbled over the problem that we want to know the exit status of the last command that was executed in our ZSH. Well the obvious thing is echoing $?, but as we need this quite often we want to have it in our right prompt. Googling around a little bit, we found the solution:

In your .zshrc add the following line

RPROMPT='[%?]'

This will give you the last exit status on the right site of your shell.

My zsh now looks like this (with the additional stuff)

buenosaires:~/dev/c/git.git/>                                         (next)[1]

Writing a hg to subversion gate

Using a decentralized version control system (DVCS) like Mercurial (hg) or Git as a client for Subversion is very common. With the unique features of a DVCS a developer can have both the features of offline development and local branching while still being able to push to a subversion server. This approach is often used in environments in which subversion is the given version control system. While the approach of using this bi-directional push and pull mechanism, provided by git-svn or hgsubversion, works perfectly for one developer, it has limitations working in a team using the usual DVCS push and pull concepts.

The following article will outline the current limitations of bi-directional dvcs to subversion bridges and shows a simple approach to implement a solution for a certain instance of the problem.

Continue reading