Comments (10)
Since the notification is only shown after 10 seconds, I think the milliseconds display is not very useful. Instead, since this will only be shown for long-running commands, I have changed the format to look like 01:54:22.
This is interesting but there might be more human ways than Finished in 00:00:11.
What do you think of 02h40m11s
? Ideally if it less than a minute, 11s
. If it is less than an hour 3m15s
. Or 3min 15sec
.
from done.
I definitely like that more, but you know what they say, a PR in the hand is worth two issue requests in the bush, so I figured I'd try my hand at it. I'm not great at fish scripting, so I couldn't easily implement what you describe, or I would have.
I think a good compromise would be to merge this version (because it's better than "354.391s") and keep the issue open for the improved version?
from done.
There's a fisherman plugin that could help with that.
from done.
Oh, that looks ideal, thank you!
from done.
@jbucaran does fisherman support dependencies?
from done.
I'll just copy it over, it's just an awk function.
from done.
That won't work, that plugin prints the duration rather than return it.
from done.
@skorokithakis In fish (other shells too?) you can't return values from functions, but rather capture the output sent to the different standard streams.
~ set -l human_time (echo 10000 | humanize_duration)
~ echo $human_time
10s
~
from done.
Oh, thank you. I'll give it a go, then.
from done.
Should be done, works fine for me! Let me know if there's anything else you need before merging the PR.
from done.
Related Issues (20)
- Bad quotes in __done_humanize_duration? HOT 5
- Allow configuring urgency with notify-send for failed commands HOT 1
- tmux window detection broken in fish 3.2
- Did not work on Mac OS (11.4): ps: unsupported exe keyword HOT 5
- Ability to set notification timeout HOT 2
- Variable `$__done_notification_transient` is used but is not defined HOT 1
- Wrong parameter names in README HOT 2
- Consider joining Hacktoberfest HOT 2
- Unexpected and strange error "Unknown command: humanize_duration" HOT 7
- "basename: illegal option -- f" error when using with Tmux HOT 4
- Error messages: "error: process ID out of range" and "basename: missing operand" HOT 7
- How can I test if it's working? HOT 1
- Error printed after command finishes when terminal-notifier is not installed HOT 2
- Notifications not showing on Wayland due to focused window detection HOT 3
- macOS sound improvement HOT 4
- Not working on macOS 14.0 HOT 6
- Using tmux and terminal-notifier causes failure HOT 1
- Is it possible that this could cause Ghostty to hang on long running processes? HOT 11
- Long commands won't return in a root shell on macOS
- Cause slow prompts in WSL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from done.