lukesampson / pshazz

Give your powershell some pizazz.
The Unlicense
575 stars 40 forks source link

Theme is not used inside VSCode #78

Closed SharakPL closed 5 years ago

SharakPL commented 5 years ago

First of all I ❤️ expander theme with files colors by type. It's almost perfect! Although I'd rather use just the dirname instead full path (that tends to be very long) and git counters:

obraz

Too bad I can't have it in VSCode. Is there any way to make it work?

obraz

Posh-git does work with no problems in VSCode, because it's imported as a module directly into powershell profile. Can it be done the same way with pshazz?

https://github.com/dahlbyk/posh-git/blob/ce6381b18da9f6ec3c465cf6abd03ab7b4254e51/profile.example.ps1#L3-L9

SharakPL commented 5 years ago

So far I managed to use both, by updating my c:\Users\<username>\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 file:

If ($Env:TERM_PROGRAM -eq 'vscode') {
    Import-Module posh-git
}
Else {
    try { $null = gcm pshazz -ea stop; pshazz init 'default' } catch { }
}