Giter VIP home page Giter VIP logo

Comments (7)

zenangst avatar zenangst commented on May 26, 2024

It would be interesting if command could implement Input and Output protocols so that you should chain commands.

If a command that produces output is followed up by a command that takes input, it would use that input as its parameter. That why we could run shell script that open URL's etc. By introducing this form of composability I think we can elevate the usefulness of Command's and workflow by a ten fold.

from keyboardcowboy.

zenangst avatar zenangst commented on May 26, 2024

Perhaps a linked list of input/output commands would be better than having stray commands that you can't really combine because of the conflicting types.

from keyboardcowboy.

vadymmarkov avatar vadymmarkov commented on May 26, 2024

Could you make an early prototype of command types in code, without thinking about reusability, like if they were plain structs? Just want to see all the fields for every command before we can build more sophisticated abstractions.

from keyboardcowboy.

zenangst avatar zenangst commented on May 26, 2024

I was actually tinkering with this yesterday but I quickly went to far into implementations and hit a roadblock. I think your approach is better, so I'll make a PR adding the different commands mentioned above with the underlying data structures. I think that will give us a good starting point for further discussions.

from keyboardcowboy.

zenangst avatar zenangst commented on May 26, 2024

If you look at #5, I managed to reduce the amount of commands down to four. Pretty happy about how they ended up because it would be kinda easy to extend it with other "sub" commands by relying on Kind (if you look at both OpenCommand and ScriptCommand.

from keyboardcowboy.

zenangst avatar zenangst commented on May 26, 2024

The only thing missing here is an implementation to handle keyboard commands.
I think that would be the next logical step for me.

from keyboardcowboy.

zenangst avatar zenangst commented on May 26, 2024

Closing this issue because we currently support all the referenced types of commands.
Sure there is room for improvement here and there but they can be their own issues.

from keyboardcowboy.

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.