Closed jedahan closed 7 years ago
zsh's ls supports modifiers, for example, to only show things modified X seconds ago:
\ls $HOME/.water(ms+60) || echo "its been over 60 seconds since ya drank something"
The backslash is to make sure no weird aliases are interpreted.
If you decide to use modification time, then you don't even need to echo anything to the file, and can
function not_thirsty { touch ${HOME}/.water; }
This makes sense, my knowledge on bash and zsh is limited. Would you like to send a pull request? Please make sure that changes work for both bash and zsh.
Completed in #4
zsh's ls supports modifiers, for example, to only show things modified X seconds ago:
The backslash is to make sure no weird aliases are interpreted.
If you decide to use modification time, then you don't even need to echo anything to the file, and can