Skip to content

Clarify uses for results of Get-PSReadLineOptions #3601

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

Open
1 task done
StevenBucher98 opened this issue Feb 28, 2023 · 0 comments
Open
1 task done

Clarify uses for results of Get-PSReadLineOptions #3601

StevenBucher98 opened this issue Feb 28, 2023 · 0 comments
Labels
Issue-Enhancement It's a feature request.
Milestone

Comments

@StevenBucher98
Copy link
Collaborator

Prerequisites

  • Write a descriptive title.

Description of the new feature/enhancement

When I was exploring some of the coloring options available in PSReadLine I was confused when the options I got from Get-PSReadLine were not working when I did Set-PSReadLineOption -Colors @{<KEY>='Green'} . The options were expressed like "Color" but in order for them to work you just need "". An example of this confusion can be seen in screenshot below:

Screenshot 2023-02-27 at 2 33 06 PM

Proposed technical implementation details (optional)

Have more clear formatting to show the color options verses the other options available in PSReadLine, perhaps a header showing these are color specific keys. Maybe utilize the same formatting that Get-PSReadLineKeyHandlers use.

i.e

PS /Users/stevenbucher> Get-PSReadLineOption

Editmode
=======
Option                                  Value             Description
---                                    --------           -----------

EditMode                               : Emacs.           Some description

History Options
============

AddToHistoryHandler                    : System.Func`2[System.String,System.Object]
HistoryNoDuplicates                    : True
HistorySavePath                        : /Users/stevenbucher/.local/share/powershell/PSReadLine/ConsoleHost_history.txt
HistorySaveStyle                       : SaveIncrementally
HistorySearchCaseSensitive             : False
HistorySearchCursorMovesToEnd          : False
MaximumHistoryCount                    : 4096

....

Color Options
==========

Option                                  Value             Description
---                                    --------           -----------
Command                           : "`e[93m"              PowerShell Cmdlets
Comment                           : "`e[32m"
ContinuationPrompt                : "`e[37m"
DefaultToken                      : "`e[37m"
Emphasis                          : "`e[96m"
Error                             : "`e[91m"
InlinePrediction                  : "`e[38;5;238m"
Keyword                           : "`e[92m"
ListPrediction                    : "`e[92m"
ListPredictionSelected            : "`e[48;5;238m"
Member                            : "`e[97m"
Number                            : "`e[97m"
Operator                          : "`e[90m"
Parameter                         : "`e[90m"
Selection                         : "`e[30;47m"
String                            : "`e[36m"
Type                              : "`e[37m"
Variable                          : "`e[92m"

Very rough design but just a thought for potential way to do this.

NOTE: this would be a breaking change so may not be worth however my personal preference is having more detailed and categorization of these options.

@StevenBucher98 StevenBucher98 added the Issue-Enhancement It's a feature request. label Feb 28, 2023
@ghost ghost added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Feb 28, 2023
@StevenBucher98 StevenBucher98 removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Mar 2, 2023
@StevenBucher98 StevenBucher98 added this to the Future milestone Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Enhancement It's a feature request.
Projects
None yet
Development

No branches or pull requests

1 participant