PowerLine icon indicating copy to clipboard operation
PowerLine copied to clipboard

Where is the prompt settings stored?

Open Thraka opened this issue 5 years ago • 4 comments

Back when I was using PowerShell on Windows I had customized the prompts a lot with PowerLine. I moved on to PowerShell Core about 5 months ago. I just decided to install the modules for PowerLine but when I import the module the old prompt I had back in PowerShell for Windows shows up.

I can't figure out how to get rid of the old prompt.

Thraka avatar Feb 18 '20 23:02 Thraka

I found it: C:\Users\YourUserID\AppData\Roaming\powershell\HuddledMasses.org\PowerLine\Configuration.psd1

DarkSeedRA avatar Jun 16 '20 19:06 DarkSeedRA

Sorry you had to find that on your own. I use the Configuration module, so you can always do: Get-Module PowerLine | Get-StoragePath to find the folder.

Of course, you can also just Set-PowerLinePrompt to get it the way you want, and then Export-PowerLinePrompt to save the configuration (I still don't like that command name, but I'm not sure what would be better).

Jaykul avatar Jul 14 '21 06:07 Jaykul

@Jaykul - how about using the Backup and Restore verbs?

So Set-PowerLinePrompt will be for setting, Restore-PowerLineConfiguration will be for explicitly restoring from a previously (or default) setup, Backup-PowerLineConfiguration will be for storing configuration using the Configuration Module.

This way there is a clear separation of tasks between the different verbs and commands

Lockszmith-GH avatar Oct 11 '21 19:10 Lockszmith-GH

I can see using Backup/Restore instead of Import/Export, but since we don't keep multiple sets of backups, it's a little misleading, don't you think? Honestly, I remembered the reason why PowerLine uses Import and Export is because that's the name of the commands we're wrapping in the Configuration module (where they make a little more sense).

I think what I want is for the Configuration module to support named sets of configuration, so I could Import-Configuration Dark for instance. Of course, that will be partly mirroring the EzTheme functionality, but I can live with that.

Jaykul avatar Oct 24 '21 17:10 Jaykul