Skip to content

Customize MenuComplete selection/inverted colors #187

Closed

Description

Is there a way to control the bg/fg colors of the selected item when using MenuComplete? I have a system where the colors used make the text not readable. It would be nice if I could configure those colors.

Activity

  1. lzybkr commented on Jan 16, 2015

    @lzybkr
    Contributor

    There isn't. Ideally I could just set the Inverse property on the characters and conhost would do the right thing, but it doesn't.

    I was trying to avoid more color options - would you mind sharing the colors you have so I can experiment a bit more to see if there is some suitable formula that works better?

  2. rkeithhill commented on Jan 22, 2015

    @rkeithhill
    ContributorAuthor

    This shows the problem:
    invertedcolors
    Here is my color config:
    colorconfig

  3. godeater commented on Jan 22, 2015

    @godeater

    Wow. Someone that still uses the old command prompt window, and not ConEmu!
    On 22 Jan 2015 05:10, "Keith Hill" notifications@github.com wrote:

    This shows the problem:
    [image: invertedcolors]
    https://cloud.githubusercontent.com/assets/5177512/5850858/273c9718-a1ba-11e4-8c79-14131129c050.png
    Here is my color config:
    [image: colorconfig]
    https://cloud.githubusercontent.com/assets/5177512/5850862/2ef43ba0-a1ba-11e4-8e0f-d986d5ffc6ea.png

    —
    Reply to this email directly or view it on GitHub
    #187 (comment).

  4. lzybkr commented on Jan 22, 2015

    @lzybkr
    Contributor

    I used to use ConEmu, but it actually made me less productive unfortunately.

    I noticed significantly slower builds when using ConEmu - and one somewhat flaky internal build tool would occasionally crash only in ConEmu.

    Keith - what are the RGB values for Screen Text?

  5. rkeithhill commented on Jan 23, 2015

    @rkeithhill
    ContributorAuthor

    Screen text color is 255,255,255 i.e. white.

  6. erichiller commented on Mar 25, 2017

    @erichiller

    Piggybacking on this, as it is exactly what I was looking for as well. Specifically though with
    Set-PSReadlineKeyHandler -Key Tab -Function Complete
    When running autocomplete on file/path type inputs, say cat (Get-Content) or ls (Get-ChildItem)

    Whereas a colorized prompt (using the module PSColor in addition) yields:
    image

    Tab-Complete Yields:
    image

    It'd be tremendous if both outputs matched. I hope this is the same vein (not trying to hijack). Or is this a separate topic?

  7. lzybkr commented on Mar 26, 2017

    @lzybkr
    Contributor

    Eric Hiller (@erichiller) - that's a good idea, maybe open a new issues though because it's different enough.

    As for the original issue from Keith Hill (@rkeithhill) - it will be interesting to try the ANSI escape sequence for inverse - an option not available when I originally wrote this code, and also only available on Win10, but it's still possible it's an improvement.

  8. erichiller commented on Mar 26, 2017

    @erichiller

    Jason Shirk (@lzybkr) Thanks Jason - I wrote it up as a standalone in #523

  9. lzybkr commented on Oct 31, 2017

    @lzybkr
    Contributor

    FYI - I switched to using the ANSI escape sequence for inverse in #561 - I'm not totally happy with the result though, it looks weird when you have a bunch of different colors.

  10. daxian-dbw commented on Apr 5, 2022

    @daxian-dbw
    Member

    I think this is already addressed. See the documentation for Set-PSReadLineOption -Colors

    Selection: The color to highlight the menu selection or selected text.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions