Skip to content
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

Error setting theme #2

Closed
ngosney opened this issue Jul 16, 2018 · 15 comments
Closed

Error setting theme #2

ngosney opened this issue Jul 16, 2018 · 15 comments

Comments

@ngosney
Copy link

ngosney commented Jul 16, 2018

Each time that I attempt to set a theme I always get the following error: "A parameter cannot be found that matches parameter name 'ContinuationPromptForegroundColor'." I am not sure if something changed in PSReadline or what. I am also attaching a screenshot in case it helps. Thanks!

image

@mmims
Copy link
Owner

mmims commented Jul 16, 2018

Do you know what version of PSReadline you are using? It is more than likely the 2.0.0 version. There were significant changes to that version that this module is not currently compatible with. I have been working on modifying PSConsoleTheme to work with it. I might publish a pre-release version to support users who are using the 2.0.0 beta.

@ngosney
Copy link
Author

ngosney commented Jul 16, 2018 via email

@mmims
Copy link
Owner

mmims commented Jul 16, 2018

Absolutely, I will let you know when it is available.

@adrienne
Copy link

adrienne commented Oct 3, 2018

I'm having this problem too! Please advise.

@mmims
Copy link
Owner

mmims commented Oct 4, 2018

I've looked into this some more and there are significant issues with the way PSReadline handles colors in the 2.0.0 beta. The most difficult issue is that it does not honor light backgrounds. The resulting experience with PSConsoleTheme is less than optimal and is inconsistent with the experience with PSReadline 1.x. Because of this inconsistency, I don't feel comfortable releasing a beta to address this until the behavior is a little more consistent.

I will submit an issue to the PSReadline project, and hopefully it will be addressed soon. However, I don't know what the roadmap for 2.0 is.

@Padavan
Copy link

Padavan commented Dec 11, 2018

@ngosney
Copy link
Author

ngosney commented Dec 11, 2018

Unfortunately I am still receiving the same error message. Is this something that you will need to fix in the module?
Thanks,
Nick

@Willsatroyd
Copy link

I have a workaround for the 1809 release which is to uninstall PSReadLine v2 (by removing the module folder) and then install-module v1.2. That said I'm not a massive PSReadLine user, so there may be functionality that I've lost but am not aware of.

@mmims
Copy link
Owner

mmims commented Dec 20, 2018

I've never quite understood why newer versions of Windows 10 have a beta version of the PSReadLine module. The biggest difference between 1.x and 2.x is support for Powershell Core and VT escape sequences. The signatures for several cmdlets also changed, but overall you shouldn't lose anything by going to v1.2.

@mmims
Copy link
Owner

mmims commented Jan 15, 2019

I have added a pre-release version that supports PSReadline 2.0. The issue with "light" themes still exists, but you shouldn't have any issues if you are using a dark theme. The v0.6.0-alpha1 pre-release is available on the releases page or through the powershell gallery:

Install-Module PSConsoleTheme -AllowPrerelease -Force

Please provide any feedback here.

@ngosney
Copy link
Author

ngosney commented Jan 15, 2019 via email

@nomoresecrets
Copy link

the pre-release LGTM on PowerShell 6.1.1

@nomoresecrets
Copy link

works also fine on "classic" Windows PowerShell 5.1.17763.134 after manually upgrading PowershellGet via Install-Module PowershellGet -Force

@rjt
Copy link

rjt commented Oct 11, 2019

PS C:\WINDOWS\system32> Install-Module PSConsoleTheme -AllowPrerelease -Force
Install-Module : A parameter cannot be found that matches parameter name 'AllowPrerelease'.
At line:1 char:31
+ Install-Module PSConsoleTheme -AllowPrerelease -Force

  •                           ~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (:) [Install-Module], ParameterBindingException
    • FullyQualifiedErrorId : NamedParameterNotFound,Install-Module

@mmims
Copy link
Owner

mmims commented Oct 16, 2019

PS C:\WINDOWS\system32> Install-Module PSConsoleTheme -AllowPrerelease -Force
Install-Module : A parameter cannot be found that matches parameter name 'AllowPrerelease'.
At line:1 char:31
+ Install-Module PSConsoleTheme -AllowPrerelease -Force

* ```
                            ~~~~~~~~~~~~~~~~
  ```
  
  
  
  * CategoryInfo          : InvalidArgument: (:) [Install-Module], **ParameterBindingException**
  * FullyQualifiedErrorId : NamedParameterNotFound,Install-Module

@rjt It appears you have an outdated version of the PowershellGet module. I believe -AllowPrerelease was introduced version 2.x. You can run the following commands to update it:

Import-Module PowershellGet
Get-Module PowershellGet #shows the currently installed version
Find-Module PowershellGet  #shows the most current version available
Install-Module PowershellGet -Force  #update the module

Restart your powershell session after updating the module and you should be able to install the prerelease version.

@mmims mmims closed this as completed in 3c0786e Feb 12, 2020
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

7 participants