adds a list subcommand to input (interactive selections) (#8963)

# Description
Adds a subcommand `list` to `input` (can be migrated wherever if needed)
that allows interactive single and multi selection from an input list.

![image](https://user-images.githubusercontent.com/7041726/236072161-5954dad9-8152-4752-ae3b-b21577711fd1.png)



https://user-images.githubusercontent.com/7041726/233747242-1ca6c44b-e32c-48f1-8fa8-ae50f813be16.mp4


In case it's not clear, only the results are captured (for now the
results are also printed to stderr next to the prompt)


https://user-images.githubusercontent.com/7041726/233785814-f2c8c584-9dd4-4b26-9ae9-c819ed6aa954.mp4


# User-Facing Changes
- Adds a new command `input list`
# Tests + Formatting
Not sure how we can test interactives any ideas?

---------

Co-authored-by: Darren Schroeder <343840+fdncred@users.noreply.github.com>
This commit is contained in:
Mel Massadian
2023-05-04 19:14:41 +02:00
committed by GitHub
parent edb61fc1d5
commit 10d65b611f
7 changed files with 269 additions and 4 deletions

View File

@ -257,6 +257,7 @@ pub fn create_default_context() -> EngineState {
Clear,
Du,
Input,
InputList,
Kill,
Sleep,
TermSize,