Git Product home page Git Product logo

Comments (5)

adamkleingit avatar adamkleingit commented on August 26, 2024 1

On the other hand if you want to press up to get to runrun again, it will be annoying that it's not in the user history.
So I guess implementing your own history inside runrun sounds like the best solution to me.

from runrun-cli.

alexilyaev avatar alexilyaev commented on August 26, 2024

Can you share a flow of events where this is useful?
As it takes time to find a command in history, perhaps it's just as easy to run runrun to execute what you want.

One thing I can think of is running an npm script with extra arguments (not yet supported).
That would be useful in command history.

@elektronik2k5 mentioned npm-quick-run, which has a way to run scripts with few characters, but the interactive mode won't add to command history either (I think).

from runrun-cli.

alexilyaev avatar alexilyaev commented on August 26, 2024

After using runrun for a while, I've started experiencing what you were talking about...
Running a script like lint:eslint through runrun and then wanting to run it again by pressing the Up arrow key.

So... if it's possible, should definitely push the command to the command line history.

Note to self:
ntl has some solutions without touching the history:
https://github.com/ruyadorno/ntl#arrows_counterclockwise-repeat-the-last-ran-task

from runrun-cli.

alexilyaev avatar alexilyaev commented on August 26, 2024

@zoharyzgiaev Let's move forward with this...

Similar to this package:
https://github.com/ruyadorno/lru-cache-fs/blob/master/index.js

We don't need lru-cache, let's just save files with latest used script name.
For each CWD we'll have a file with just a string (e.g. 'lint-eslint').

Let's add fs-extra and make sure to use env-paths.

Also we now have an rr alias for runrun so the last run should be with rrr.
This is set in package.json under bin.

from runrun-cli.

alexilyaev avatar alexilyaev commented on August 26, 2024

@adamkleingit Good news, it's live! 😎.
Done in #13

Read the v1.2.0 Release Notes
Would appreciate feedback.

from runrun-cli.

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.