-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for displaying complete options immediately #130
Comments
Print the available options? How? I think I need a bit more detail to fully evaluate this proposal. Printing multiple options probably needs multiple lines, and liner isn't likely to gain any additional options that result in multiple line drawing (SetMultiLineMode notwithstanding). |
Sorry, I should have been more thorough in my initial request. Say I want to use Now, if the number of available options is too large and don't fit a single line, it's OK to just trim them to the first few options that fit. (Basically it doesn't change the way completion display works, just the fact that the tab completion is triggered immediately, and doesn't wait for the user to press |
I'm still having difficulty visualizing how the proposed multiple options would appear. How do you plan to implement temporary-overstrike-mode? Do you plan to use some sort of delimiter so the user knows where the suggestion ends if they're typing in the middle of a line of input? |
I don't expect any changes to be made to the way the current completion is performed. (I.e. they are performed as now on a separate line.) The only change I'm proposing to make is this: when the user is shown the prompt, before it reads any user input, Perhaps the feature request could have been better called: "add an option to display auto-completion options immediately without waiting for the user to press |
Assuming you mean "behave as if tab was pressed after every keystroke": That would make it impossible to type a non-completed value if the first part of your non-completed value happened to match a tab value. Assuming you mean "behave as if tab was pressed exactly once, when Prompt is called", that's exactly the same as calling the completion function yourself and then calling |
It's not exactly the same thing, as for example if in a future you would update your code to allow choosing the option with direction keys, or ordering the completions in any way, it would be consistent. If I would have called the completion and displayed it myself, it would be inconsistent with any such future updates. |
Sometimes, for example when
liner
is used to allow the user to choose from a few options, it would be useful to immediately print the available options, instead of waiting the user to press theTab
key first.I think a function like
SetTabCompletionImmediate (bool)
would enable users to control this.If this change would be accepted, I could try to provide the implementation.
The text was updated successfully, but these errors were encountered: