Skip to content

ShowToolTips option no longer works with the Complete function in 2.0.0 betas #763

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

Closed
MartinGC94 opened this issue Sep 22, 2018 · 6 comments
Milestone

Comments

@MartinGC94
Copy link

Environment data

PS version: 5.1.17134.228
PSReadline version: 2.0.0-beta3
os: 10.0.17134.1 (WinBuild.160101.0800)
PS file version: 10.0.17134.1 (WinBuild.160101.0800)

Steps to reproduce

1: Enable the Complete and ShowToolTips options
Set-PSReadlineKeyHandler -Chord Tab -Function Complete
Set-PSReadlineOption -ShowToolTips
2: Try to tab complete anything that would show a tooltip (Command, Parameter)

In 1.2 it shows each command/parameter on a list with the default parameter set/The input value for that parameter like this:

Get-ChildItem -<TAB><TAB>
Path                 - [string[]] Path
LiteralPath          - [string[]] LiteralPath
Filter               - [string] Filter
...

In all of the 2.0 beta releases it shows each entry in a grid like formation with no tooltips anywhere

Get-ChildItem -<TAB><TAB>
Path                 Depth                File                 ErrorAction          OutVariable
LiteralPath          Force                Hidden               WarningAction        OutBuffer
...

The tooltips are important, but the list view is just as important to me.

@lzybkr
Copy link
Contributor

lzybkr commented Sep 24, 2018

Did you try beta1 or beta2?

I removed the list view, but enabled ShowToolTips by default. It seems like it's not working in beta3 though, maybe related to a PR from @jianyunt who was fixing other issues in that code.

I had essentially no feedback on ShowToolTips, so I wasn't sure anyone even used it. I did find that the list view truncated much of the useful information in the tooltip. By moving to the table view and displaying the tooltip below the table, I think it's an improved experience. I'm certain there is still room for improvement, but I haven't really had the time or ideas to try for an even better experience.

@jianyunt
Copy link
Contributor

It looks like beta2 andbeta3 have the consistent behavior.

PS E:\> $a=Get-Module -name PSReadline
PS E:\> $a.PrivateData.PSData

Name                           Value
----                           -----
Prerelease                     beta2


PS E:\> Get-ChildItem -
Path                 Recurse              Attributes           System               InformationAction    OutBuffer
LiteralPath          Depth                Directory            Verbose              ErrorVariable        PipelineVariable
Filter               Force                File                 Debug                WarningVariable
Include              Name                 Hidden               ErrorAction          InformationVariable
Exclude              UseTransaction       ReadOnly             WarningAction        OutVariable
PS E:\> Get-ChildItem -

@lzybkr
Copy link
Contributor

lzybkr commented Sep 24, 2018

Oh, right, ShowCompletions no longer shows tool tips (and I'm not sure I'll revisit that), but MenuComplete should.

@lzybkr
Copy link
Contributor

lzybkr commented Sep 29, 2018

@jianyunt - your change did regress MenuComplete. If your start in a new window, tooltips appear below the menu, but if you are at the bottom of the buffer, tooltips no longer appear.

@MartinGC94
Copy link
Author

I agree that the tableview and the dynamic tooltip at the bottom is an improved experience for MenuComplete, but for Complete the only view that makes sense in my eyes is the list view with tooltips, and it's the perfect view for quickly checking the parameters for a cmdlet.

You said you weren't sure if you would revisit it, but would you be open to the idea of someone else adding back the old listview + tooltips to complete as an option?

@lzybkr
Copy link
Contributor

lzybkr commented Oct 8, 2018

@MartinGC94 - I think having too many options is a bad thing - it can be way too confusing.

I am open to improvements though, e.g. using a different UI for specific completion types like parameters.

@lzybkr lzybkr added this to the 2.0.0-beta4 milestone Oct 12, 2018
lzybkr added a commit that referenced this issue Oct 23, 2018
A recent PR disabled the display of tooltips completely, and there were
some problems with the menu display when the command line was at the
bottom of the buffer and scrolling was necessary.

Fix #763 and probably #765
@lzybkr lzybkr closed this as completed in dfd5ae1 Oct 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants