You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: Classic popup menus with incremental filters #122
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.
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.
Andrew Bradley (@cspotcode)
This is really good! I find the default PowerTab colors weird. But fortunately, this is configurable (yet the first impression is really poor, IMHO). It would be really nice to have this built-in...
Roman Kuzmin 1967-2026 (@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
fixed or improved. I am going to use this, it is better than the UI provided by
PSReadline. It's just me, perhaps, but I got used to such menus for years of
using Far Manager. To me such menus work better in cases with many items and
these cases are frequent. Also, GuiCompletion may be used for PSRealine history,
hopefully.
If you want you may add me as a collaborator. But I have to add that I consider
the project as the concept proof. Ideally, it should be the part of PSReadline.
As far as remember, some experiments were done by the author. So I would like
to make GuiCompletion better but not to the state of art. Besides, I think
that PowerShell is not a quite right language for this. It should be written
in .NET (C#) because it is relatively complex, performance sensitive, etc.
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.
Activity
lzybkr commentedon Jun 14, 2014
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.
nightroman commentedon Jun 20, 2014
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.
cspotcode commentedon Jun 18, 2017
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.
nightroman commentedon Jun 25, 2017
Andrew Bradley (@cspotcode)
This is really good! I find the default PowerTab colors weird. But fortunately, this is configurable (yet the first impression is really poor, IMHO). It would be really nice to have this built-in...
cspotcode commentedon Jul 3, 2017
Roman Kuzmin 1967-2026 (@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
nightroman commentedon Jul 4, 2017
Andrew Bradley (@cspotcode)
Thank you, I will submit a few PRs soon, I found quite a few issues that may be
fixed or improved. I am going to use this, it is better than the UI provided by
PSReadline. It's just me, perhaps, but I got used to such menus for years of
using Far Manager. To me such menus work better in cases with many items and
these cases are frequent. Also, GuiCompletion may be used for PSRealine history,
hopefully.
If you want you may add me as a collaborator. But I have to add that I consider
the project as the concept proof. Ideally, it should be the part of PSReadline.
As far as remember, some experiments were done by the author. So I would like
to make GuiCompletion better but not to the state of art. Besides, I think
that PowerShell is not a quite right language for this. It should be written
in .NET (C#) because it is relatively complex, performance sensitive, etc.
lzybkr commentedon Jul 4, 2017
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.
lzybkr commentedon Oct 31, 2017
FYI - incremental filtering has been merged, see #515 and #561. It doesn't change the UI though.
daxian-dbw commentedon Apr 5, 2022
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.