Git Product home page Git Product logo

Comments (3)

nthorne avatar nthorne commented on June 1, 2024

Sounds like a good feature; one could keep the default behaviour for days, but add support for stepping months or years.

I agree that the BSD behaviour is more desirable when stepping months. A bit trickier to get that one working, but nothing impossible.

from todo.txt-cli-again-addon.

jbrc avatar jbrc commented on June 1, 2024

I'm working on implementing this feature right now. For more efficient testing, I found it useful to move some of the helper functions (adjust_date, determine_date_version, and a couple of others) to a separate file which I named againHelpers.sh. I also created a new unitTests.sh file that sources againHelpers.sh and makes several calls to adjust_date, without having to setup dummy tasks in test\sample.txt. My plan is for again to also source againHelpers.sh. Does this violate a design goal of keeping all of the add-on code in a single file?

If it does, my backup plan was to add a flag in again (something like AGAIN_TEST_IN_PROGRESS) and place most of the execution inside of an if block guarded by this flag. testAgain.sh could set the flag (to disable execution) then source again. If you would like to stick to a single file, what are your thoughts regarding this approach?

from todo.txt-cli-again-addon.

nthorne avatar nthorne commented on June 1, 2024

I hate code duplication as much as the next developer, and I most certainly do not have some hidden single-file agenda, so if refactoring things into a utility file makes development and testing easier, I'm all for it.

One alternate solution to all of this would, I guess, be to detect modify again in such a way that it detects if it is sourced or not, and provide different behaviour in that case, but I'm not sure if there exists a portable way to detect that.

from todo.txt-cli-again-addon.

Related Issues (10)

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.