Thursday, June 20, 2013

Debugging a zsh startup script

I had a weird problem during startup of new shells. Usually when I don't have a clue, why something works one way or another (or doesn't) I start strace -f and have a look at the syscalls. Now when you try that on a shell, that doesn't really give you what you are looking for, which is kind of obvious if you think what a shell does and how it works. Now what? You have two simple options: set -x or setopt XTRACE VERBOSE (alternatively start with zsh -xv); both did the trick for me.