Set prompt variables in precmd

This (finally) fixes resize oddities.