Do not ask which file to restore if there is only one option#369
Open
GideonBear wants to merge 1 commit intoandreafrancia:masterfrom
Open
Do not ask which file to restore if there is only one option#369GideonBear wants to merge 1 commit intoandreafrancia:masterfrom
GideonBear wants to merge 1 commit intoandreafrancia:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ref #175, #359
When a path is passed, and only a single option is available, automatically select that option without waiting for user input. The information usually printed during the selection screen is still printed.
Rationale: the only reason to have a selection when there is only one option, would be to have the option to cancel, but when I explicitly supply a filename, why would I want to? I know what I'm restoring (since I'm passing the filename).
When I don't supply a filename, it would IMO not be a good idea to skip this step; since 1. the user doesn't know what file they are restoring and 2. it could just be to list the files able to be restored.
restore_asking_the_userandRestoreAskingTheUserhaving a path specifically not asking the user is a bit weird, and could be improved; but I wasn't sure how, I would appreciate some help there.mypy .passespytestpasses