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

Question: Possible to prompt for additional input in command?

Open vinnybod opened this issue 4 years ago • 5 comments

Stripped down example:

vinnybod > delete thing
Are you sure you want to delete 'thing'? y/N
n # exits
y # continues to process command

I didn't see any examples of this, KilehParty and NanoEditor both accept input via eventHandlers, but that's just to terminate the command.

vinnybod avatar Oct 30 '20 01:10 vinnybod

Unfortunately now. You would need to return your component, do the questions and terminate when finished. Maybe you have a good API idea for that :100:

ndabAP avatar Oct 30 '20 07:10 ndabAP

Thanks, I'll work on a prototype and add it here. There may not be a need for new APIs

vinnybod avatar Oct 30 '20 19:10 vinnybod

@vinnybod how did you end up going about this if you have since your last comment? I have a similar requirement :)

Fabio101 avatar Mar 10 '21 08:03 Fabio101

@Fabio101 The requirements for my project changed so I didn't end up needing this full terminal emulator. But I did prototype something using a custom template like the examples. I was gonna share that here, but I must have deleted the branch already.

vinnybod avatar Mar 11 '21 02:03 vinnybod

Hmm, OK, ty

Fabio101 avatar Mar 12 '21 12:03 Fabio101