JanDeDobbeleer / oh-my-posh2

A prompt theming engine for Powershell
MIT License
5.19k stars 284 forks source link

$ThemeSettings.PromptSymbols.ElevatedSymbol does not show normally on user mode #266

Closed lisonge closed 4 years ago

lisonge commented 4 years ago

win10x64v1903 windows terminal v1.0.1401.0

Microsoft.PowerShell_profile.ps1

Import-Module posh-git 
Import-Module oh-my-posh 
Set-Theme Avit
$ThemeSettings.PromptSymbols.VirtualEnvSymbol = [char]::ConvertFromUtf32(0x1F525)
# $ThemeSettings.PromptSymbols.ElevatedSymbol = [char]::ConvertFromUtf32(0x2604)
$ThemeSettings.PromptSymbols.ElevatedSymbol = [char]::ConvertFromUtf32(0x1F51E)

on user mode

~                                                                                        ◷ 19:43:06
▶ Show-ThemeSymbols

--PromptSymbols--

 🔞 ElevatedSymbol
  ⨯ FailedCommandSymbol
  ~ HomeSymbol
  \ PathSeparator
  ▶ PromptIndicator
  # RootSymbol
  ⚡ SegmentBackwardSymbol
   SegmentForwardSymbol
  ⚡ SegmentSeparatorBackwardSymbol
  ⚡ SegmentSeparatorForwardSymbol
    StartSymbol
 .. TruncatedFolderSymbol
  § UNCSymbol
 🔥 VirtualEnvSymbol

--GitSymbols--

  } AfterStashSymbol
    BeforeIndexSymbol
  { BeforeStashSymbol
    BeforeWorkingSymbol
  ↑ BranchAheadStatusSymbol
  ↓ BranchBehindStatusSymbol
  ≣ BranchIdenticalStatusToSymbol
   BranchSymbol
  ≢ BranchUntrackedSymbol
  | DelimSymbol
    LocalDefaultStatusSymbol
  ~ LocalStagedStatusSymbol
  ! LocalWorkingStatusSymbol
System.Collections.Hashtable OriginSymbols

~                                                                                        ◷ 19:43:15
▶ cd E:/Documents/Projects/computed-cached-property
E:\Documents\Projects\computed-cached-property  master ≣                                                                                        19 hours ago
▶ pipenv shell
Launching subshell in virtual environment…
PowerShell 7.0.2
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/powershell
Type 'help' to get help.

E:\Documents\Projects\computed-cached-property  master ≣                                                                                        19 hours ago
🔥 computed-cached-property-gTdZmg-H ▶

on administrator mode

PowerShell 7.0.2
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/powershell
Type 'help' to get help.

~ 🔞                                                                                     ◷ 19:45:31
▶

even i reboot my computer, reinstall oh-my-posh, but no change

why the ElevatedSymbol do not show on user mode??

lisonge commented 4 years ago

i am so sorry, My English is so bad

lorh4n commented 4 years ago

I had this error too, but it worked like this:

$global:DefaultUser = [System.Environment]::UserName
Import-Module posh-git
Import-Module oh-my-posh
Set-Theme Paradox
$global:ThemeSettings.PromptSymbols.HomeSymbol = [char]::ConvertFromUtf32(0x0001F3E0)
$global:ThemeSettings.PromptSymbols.VirtualEnvSymbol = [char]::ConvertFromUtf32(0x1F525)

in $profile