Giter VIP home page Giter VIP logo

Comments (10)

franciscolourenco avatar franciscolourenco commented on August 17, 2024

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.

skorokithakis avatar skorokithakis commented on August 17, 2024

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.

jorgebucaran avatar jorgebucaran commented on August 17, 2024

There's a fisherman plugin that could help with that.

from done.

skorokithakis avatar skorokithakis commented on August 17, 2024

Oh, that looks ideal, thank you!

from done.

franciscolourenco avatar franciscolourenco commented on August 17, 2024

@jbucaran does fisherman support dependencies?

from done.

skorokithakis avatar skorokithakis commented on August 17, 2024

I'll just copy it over, it's just an awk function.

from done.

skorokithakis avatar skorokithakis commented on August 17, 2024

That won't work, that plugin prints the duration rather than return it.

from done.

jorgebucaran avatar jorgebucaran commented on August 17, 2024

@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.

skorokithakis avatar skorokithakis commented on August 17, 2024

Oh, thank you. I'll give it a go, then.

from done.

skorokithakis avatar skorokithakis commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.