vue-command icon indicating copy to clipboard operation
vue-command copied to clipboard

Feature: Execute command programmatically from outside

Open byte-voyager opened this issue 5 years ago • 1 comments

Will consider adding this feature?

byte-voyager avatar Nov 17 '20 07:11 byte-voyager

I would like to take this ticket on! I want to have similar functionality, i want to programmatically change the history inside the vue-command.

The idea I had:

Since stdin is depended on local.stdin , we could move that into history props. History props would have both stdin and the resulting stdout component. Then when we v-for="({stdout, stdin}, index) in local.history" in VueCommand, we could point stdin.sync to either stdin || local.stdin.

This way if anyone wants to execute comment programmatically from the outside, they just need to add it to history props.

Let me know if you agree with this?

Also thank you very much for such an awesome project 💯

sooryranga avatar Apr 29 '21 12:04 sooryranga

That's now possible. Use the exposed function dispatch(command).

ndabAP avatar Dec 17 '22 14:12 ndabAP