Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

zsh prompt not updating until first 'chdir'




Hello folks
Just back on the list after a long absence (exiled to Windows for a few years, just bought a Mac).

I'm very rusty on my ZSH skills, and hope someone can help. I have a $PROMPT setup in .zshenv

setprompt () { PROMPT="

---------------------------------%t/%T ---------------------------------
%S[OLDPWD: $OLDPWD]
     [PWD: %~]%s
$SHORT_HOST> "
}

chpwd () { setprompt }

this works fine AFTER my first chdir, but when I first login, it leaves me with the default prompt.

Can someone remind me what I have to do to get this to update as soon as I login?

Thanks!

TjL

ps - running ZSH 4.04, 4.06 and 4.1.1, fwiw




Messages sorted by: Reverse Date, Date, Thread, Author