Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You can reduce down to 1 file with modification times #2

Closed
jedahan opened this issue Feb 23, 2017 · 2 comments
Closed

You can reduce down to 1 file with modification times #2

jedahan opened this issue Feb 23, 2017 · 2 comments

Comments

@jedahan
Copy link

jedahan commented Feb 23, 2017

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; }
@kalbhor
Copy link
Owner

kalbhor commented Feb 23, 2017

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.

@kalbhor
Copy link
Owner

kalbhor commented Feb 23, 2017

Completed in #4

@kalbhor kalbhor closed this as completed Feb 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants