-
Notifications
You must be signed in to change notification settings - Fork 304
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
Feature request: Classic popup menus with incremental filters #122
Comments
It's definitely in scope. You can see I played with the UI a tiny bit in the project here: https://github.com/lzybkr/PSReadLine/blob/master/TestPSReadLine/Program.cs#L11 The current MenuComplete was quick to implement and the UI matches zsh. I haven't decided if I like it better than PowerTab, but I think having both choices will be good. The box outlines do waste some space and personally I find the PowerTab experience a little jarring, but it is cool. I expect I'll add filtering next with no UI changes, but it might be some time - it's hard to spend my free time indoors during the summer in Seattle. |
Just a thought. If such popup lists are implemented then they may be also exposed by PSReadline for use in scripts (eventually, hopefully). Some interesting and completely new interactive scenarios will be easy to script and use. As for the PowerTab experience, honestly, I could not get used to it either. But, as mentioned, I implemented something myself and this turned out to be just fine. So the experience may depend on implementation, preferences (configurable?), and etc. It's not that the idea of popups in console is somewhat wrong. |
For anyone who finds this issue, I wrote a quick module that integrates PowerTab's popup implementation with PSReadline's key handlers. https://www.powershellgallery.com/packages/GuiCompletion/ Nothing fancy, but it gets the job done. Hit Ctrl+Space and the menu pops up. The menu rendering and filtering implementation is pulled from PowerTab. |
@cspotcode |
@nightroman Feel free to send me a pull request and I'll merge it! You're also welcome to become a collaborator on the repository, and I'm even willing to move the repository to a more neutral location (community Github organization?) if that makes it more palatable. https://github.com/cspotcode/PS-GuiCompletion |
Thank you, I will submit a few PRs soon, I found quite a few issues that may be If you want you may add me as a collaborator. But I have to add that I consider |
I'm open to a configurable UI - but any new UI needs to use ANSI escape sequences to make it portable, and written in C#. The current rending does not use ANSI, but it needs to happen - either when I get some more free time or someone beats me to it. |
Windows Terminal may have terminal UI support in future and the tracking issue is microsoft/terminal#3121. PSReadLine will for sure use that when it's ready. Close this one as we will not use PowerTab for this. |
I would propose to think of classic popup menus with incremental filters for
TabExpansion and history. Perhaps I want too much and this is out of scope of
this project but I know from experience and practice that this is doable and
very useful. And this is not even something unusual, even vanilla CMD console
has its history (F7) implemented as a popup menu, without filtering, though.
Current implementation of the menu is useful for relatively small numbers of
items. With many items it is rather difficult to use (in particular with a wide
console window). Cases with many items are not so rare, in my practice at
least (class name lists, custom snippets, etc.). History is another example,
if it is persistent, it will be large eventually.
I implemented something like this in another console based host, that is why I
know how useful this can be. Especially if such menus are used for history as
well and support incremental filtering on typing in them. They increase
productivity a lot.
Example of TabExpansion list
The same or similar menu could be used for command history, too.
In my case though I did not have to implement these popup menus on my own (Far
Manager provides them via its API). Otherwise, I would propose some code to use
right away. But I remember there are some TabExpansion's implemented in this
way, so examples exist, presumably.
P.S. Found it, it is PowerTab.
The text was updated successfully, but these errors were encountered: