brock
12/13/2014 - 8:05 PM

Update your ZSH Date in the shell automatically

Update your ZSH Date in the shell automatically

#!/bin/zsh
# update the date in your custom zsh prompt in real-time (just like it is done all over the web)
#
# Add this to your ~/.zshrc or ~/.profile
# I find that this hangs the shell when it runs, so set the TMOUT to something that isn't annoying
# http://stackoverflow.com/a/17915260/2083544

TMOUT=30
TRAPALRM() {
    zle reset-prompt
}

Update your ZSH date automatically