Zsh
Tue, Jan 7, 2014

zsh prompt/window title: trim middle of path

I run zsh in tmux, and sometimes I end up in a deep directory where the path matches that of another window in tmux (for example in my local docker development environment and on the testing/production server). When this happens just seeing the last part of the path as the window title is not enough, like this: …/sites/all/modules/somemodule.