PowershellFrameworkCollective / psframework

A module that provides tools for other modules and scripts
MIT License
435 stars 41 forks source link

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

Open FriedrichWeinmann opened 3 months ago

FriedrichWeinmann commented 3 months ago

based on: https://github.com/PowershellFrameworkCollective/psframework/issues/638

Add a few new features:

azra1l commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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.