1
Vote

provide mechanism for custom prompt themes stored outside PSCX folder (outside of ~\Documents\WindowsPowerShell\Modules)

description

Currently if I have a custom prompt theme, I have to put a copy of it in the Themes directory (alongside the 3 default ones) on each machine. The relevant lines in Pscx.Prompt.psm1 appear to be:
 

$themeName = $Pscx:Preferences.PromptTheme
$themePath = "$PSScriptRoot\Themes\$themeName.ps1"
if (!(Test-Path $themePath))
{
Write-Warning "Theme '$themeName' not found, defaulting to Modern theme"
$themePath = "$PSScriptRoot\Themes\Modern.ps1"
}
Write-Verbose "Applying prompt theme '$themeName'"
& $themePath $Theme

 
Not sure if allowing PromptTheme to be the path to the file would be the 'right way' to make this happen (IOW, a person could set it to ~/Documents/MyTheme.ps1 or \server\stuff\MyTheme.ps1), but it would be much appreciated. :)
 
Thanks!

comments