Last active
June 11, 2018 21:31
-
-
Save brock/72850aa31783f744ce91 to your computer and use it in GitHub Desktop.
Update your ZSH Date in the shell automatically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment