Skip to content

Instantly share code, notes, and snippets.

@brock
Last active June 11, 2018 21:31
Show Gist options
  • Save brock/72850aa31783f744ce91 to your computer and use it in GitHub Desktop.
Save brock/72850aa31783f744ce91 to your computer and use it in GitHub Desktop.
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

update-time-automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment