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

Issue when running prompt #54

Open
jhollender opened this issue Jun 30, 2022 · 4 comments
Open

Issue when running prompt #54

jhollender opened this issue Jun 30, 2022 · 4 comments

Comments

@jhollender
Copy link

Description of the issue

I followed all of the instructions, but when I try to set the environment variable prompt, I get this error:

At line:1 char:5
+ $E[1;32;40m→ $E[1;36;40m$p$E[1;35;40m› $E[1;37;40m
+     ~
Missing ']' after array index expression.
At line:1 char:18
+ $E[1;32;40m→ $E[1;36;40m$p$E[1;35;40m› $E[1;37;40m
+                  ~
Missing ']' after array index expression.
At line:1 char:44
+ $E[1;32;40m→ $E[1;36;40m$p$E[1;35;40m› $E[1;37;40m
+                                            ~
Missing ']' after array index expression.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : MissingEndSquareBracket

Screenshots
2022-06-29 19_54_55-Windows PowerShell

Version Information

Please provide the output of this PowerShell command: (Get-Module PSReadline).Version; (Get-Module posh-git).Version

Major  Minor  Build  Revision
-----  -----  -----  --------
2      0      0      -1
@examosa
Copy link

examosa commented Jul 29, 2022

Hi @jhollender!

I believe that prompt string is intended for cmd.exe; you can use it with the prompt command like so:

image

To set the prompt in PowerShell, you'll likely want to use dracula-prompt-configuration.ps1. Here's what that looks like:

image

@mrfjca
Copy link

mrfjca commented Aug 29, 2022

hi,

I set the prompt to $E[1;32;40m→ $E[1;36;40m$p$E[1;35;40m› $E[1;37;40m successfully, and after setting, the changes are visible.
Screenshot 2022-08-29 213832

But when I close cmd and open it again, it goes back to the previous state !
Screenshot 2022-08-29 213927

@examosa
Copy link

examosa commented Aug 29, 2022

@mrfjca To persist the change, you'll want to save the string to the %PROMPT% environment variable. This can be accomplished in cmd using setx:

setx PROMPT "$E[1;32;40m→ $E[1;36;40m$p$E[1;35;40m› $E[1;37;40m"

@mrfjca
Copy link

mrfjca commented Aug 29, 2022

@examosa The problem was fixed 👍
Thank you very much for your help 🙏.

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

No branches or pull requests

3 participants