Files
flatpak/common
Matthew Leeds a22dfbd7c1 Default to only choice in multiple choice prompts
This commit implements a feature in the multiple choice prompt that
mirrors the behavior in the yes/no prompt where it can default to "yes"
when the user only presses Enter. In the case of the multiple choice
prompt, it only defaults to the first choice on Enter if there's only
one option (e.g. you're asked if you want to install from the "flathub"
remote as opposed to being asked to choose between the "flathub" and
"eos-apps" remotes).

This feature can be turned off on a per-prompt basis if we want explicit
user input for something but I didn't find that necessary for any of the
existing prompts.

Also note that as with the yes/no prompt defaulting to yes on Enter,
this only applies for interactive terminals. If Flatpak is being run by
a script no choice will be made automatically.

This should save users unnecessary keystrokes, such as when they use
"flatpak install devhelp" and are asked to confirm that the Flathub
remote is the one to use (now they can just press Enter).

Closes: #2288
Approved by: matthiasclasen
2018-11-06 02:48:06 +00:00
..
2018-05-24 11:59:52 +00:00
2018-07-08 10:05:37 +00:00
2018-10-02 06:21:49 +00:00
2018-10-31 22:48:56 +00:00
2018-10-02 06:21:49 +00:00
2018-07-08 10:05:37 +00:00
2018-10-02 06:21:49 +00:00
2018-07-08 10:05:37 +00:00
2018-07-08 10:05:37 +00:00
2018-07-08 10:05:37 +00:00
2018-10-02 06:21:49 +00:00
2018-10-15 13:39:36 +00:00
2018-05-24 11:59:52 +00:00
2018-07-08 10:05:37 +00:00
2018-07-08 10:05:37 +00:00
2018-07-08 10:05:37 +00:00
2018-07-08 10:05:37 +00:00
2018-07-08 10:05:37 +00:00
2018-05-24 11:59:52 +00:00
2018-07-08 10:05:37 +00:00
2018-10-27 13:49:51 +00:00
2018-05-24 11:59:52 +00:00
2018-10-08 08:36:23 +00:00
2018-10-11 14:51:51 +02:00
2018-07-08 10:05:37 +00:00