I recently set up a ubuntu 12.04 64 bit machine. I use tmux with many open windows, all of them use zsh as shell, some of them through a chroot environment that uses the same home folder of the normal environment.
After some time doing random commands in the shells (all kinds, but mostly file operations, vi, build/make commands within and without the chroot environment), each shell starts showing immediately some pre-compiled commands from the past history, which I need to remove, eg with Ctrl-Q, before I can type anything or search my previous history.
The extra annoying fact is that if I type by mistake any characters leading the pre-compiled command, then delete the line and type my own command, at the next prompt I'll get also those extra characters. This modified input then grows and grows, without ever appearing in the zsh history file.
If I delete the .zsh_history file, or create a new shell, the problem is solved for a very short time and then inexorably comes back to haunt me after a short while (few minutes of usage of the shell).
This is an example of what my prompt looks like after some time, just coming back to the shell from my previous command:
[10:59:14] user:Build git:(master*) $ schroot -c full32 -- antls -l
Note that the prompt should end obviously at $, and what follows
ant is some garbage that I typed by mistake before deleting the line with Ctrl-Q in a previous occurrence.
For context, I'm using oh-my-zsh with the geoffgarside theme and the gitfast plugin. For chroot I'm using schroot with the following configuration:
[precise-full32] description=Full 32bits dev environment aliases=full32 type=directory directory=/opt/chroot/full32 users=user root-groups=root personality=linux preserve-environment=true
I'm at my wits' end and I couldn't find any problem like this described here or elsewhere. Any clue on what can be causing this annoying behavior?