Skip to content
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

Tab Completion - Ignore Quotes in input & add option to disable sorting #639

Open
FriedrichWeinmann opened this issue Aug 27, 2024 · 4 comments

Comments

@FriedrichWeinmann
Copy link
Member

FriedrichWeinmann commented Aug 27, 2024

based on: #638

Add a few new features:

  • The simple completion should ignore leading and trailing quotes on input typed, in case the user reconsiders badly accepted input
  • When registering the completer, there should be an option to disable auto-sorting
  • There should be a global user preference setting to override the non-sorting
  • Sorting should be based on ListItemText, not Text
  • Completers should support localization on ToolTip and ListItemText
  • Completers should support an option that allows training completion with previous input (making the completion offer previously offered input)
  • Add option to always include quotes in completion
  • Add option to also prepend a wildcard to completion filtering
@azra1l
Copy link

azra1l commented Aug 28, 2024

If you are at it, i have two more requests here,

a) Would it be also possible to have an option that makes results always have quotes, if the parameter at hand is a string variable?
Right now it only adds quotes when the result has spaces. I know it doesn't matter on the shell, I just like to have strings always be quoted.

b) Is there a way to make tooltip display respect typed values?
Currently it only shows tooltips on CTRL+Space when nothing was typed yet, if something was typed already, it just expands like tab would.

@FriedrichWeinmann
Copy link
Member Author

a) is quite doable
b) is impossible without deeply hacking into the PowerShell engine - if there is only one legal parameter remaining, the tab menu is just going to complete like a normal tab. That's out of my hands, alas :(

@azra1l
Copy link

azra1l commented Aug 28, 2024

Alright, fair enough :)

But i just noticed yet another thing, i still have to write * in front to get values that match midtext.
I suppose psf just auto-adds the * at the end for the filter.
An option to filter with $WordToComplete would be nice.

I think that's all i have for now 🤞

Props for the god speed feedback 🥇 it's been 25+ years for me and this is just unmatched 😲

@FriedrichWeinmann
Copy link
Member Author

Thanks :)
Vacation is a powerful tool - can't promise the same reaction speed starting next week, when the grind resumes ^^

I suppose psf just auto-adds the * at the end for the filter.

Yepp, it only adds one at the end. Pretty sure I can add some nice options there so a user can chose their preference themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants