Fork and fix for http://kassiopeia.juls.savba.sk/~garabik/software/zshist/