JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
17.38k stars 2.39k forks source link

Azure Subscription not displaying properly in cloud-native-azure theme #4099

Closed TarekSalha closed 1 year ago

TarekSalha commented 1 year ago

Code of Conduct

What happened?

recently, I noticed, that oh my posh is not anymore displaying my active azure subscription properly,

image

though I am successfully logged in using the latest azure cli version 2.50.0

image

Using the hint on https://ohmyposh.dev/docs/segments/az even worsens the situation. When I use $env:POSH_AZURE_ENABLED = $true in $PROFILE after initializing the theme, it is displaying anything at all:

image

setting $env:POSH_AZURE_ENABLED = $false again brings back the first screenshot.

This is my $PROFILE content:

echo "wat up, man?"
echo "setting up environment..."
oh-my-posh init pwsh --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/cloud-native-azure.omp.json' | Invoke-Expression
# $env:POSH_AZURE_ENABLED = $true
# $env:POSH_GIT_ENABLED = $true
echo "all done"

Theme

cloud-native-azure

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

Version: 18.0.1

Shell: pwsh (7.3.6)

Segments:

ConsoleTitle(true)                        -   0 ms - pwsh in TarekSalha
session(true)                             -   0 ms -  TarekSalha
path(true)                                -   0 ms -   ~
git(false)                                -   6 ms -
root(false)                               -   0 ms -
exit(true)                                -   0 ms -  
node(false)                               -   0 ms -
go(false)                                 -   0 ms -
python(false)                             -   0 ms -
shell(true)                               -   0 ms - in pwsh
time(true)                                -   0 ms - at 21:01:47

Run duration: 20.144ms

Cache path: C:\Users\TarekSalha\AppData\Local\oh-my-posh

Config path: no --config set, using default built-in configuration

Logs:

[DEBUG] 21:01:47.843 shell.go:Getenv:398 → NO DATA
[TRACE] 21:01:47.843 shell.go:Getenv(TERM_PROGRAM) - 0s
[DEBUG] 21:01:47.843 shell.go:Getenv:398 → C:\Users\TarekSalha\AppData\Local
[TRACE] 21:01:47.843 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 21:01:47.843 shell_windows.go:CachePath() - 135.1µs
[DEBUG] 21:01:47.849 shell.go:Getenv:398 → NO DATA
[TRACE] 21:01:47.849 shell.go:Getenv(POSH_THEME) - 715.6µs
[DEBUG] 21:01:47.849 shell.go:resolveConfigPath:326 → No config set, fallback to default config
[TRACE] 21:01:47.849 shell.go:resolveConfigPath() - 715.6µs
[TRACE] 21:01:47.849 shell.go:Init() - 6.5338ms
[TRACE] 21:01:47.849 shell.go:Flags() - 0s
[DEBUG] 21:01:47.849 config.go:loadConfig:128 → no config file specified, using default
[TRACE] 21:01:47.849 config.go:loadConfig() - 0s
[TRACE] 21:01:47.849 shell.go:Flags() - 0s
[DEBUG] 21:01:47.849 shell.go:Getenv:398 → NO DATA
[TRACE] 21:01:47.849 shell.go:Getenv(OMP_CACHE_DISABLED) - 0s
[TRACE] 21:01:47.849 shell_windows.go:WindowsRegistryKeyValue(HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor) - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[TRACE] 21:01:47.849 shell.go:GOOS() - 0s
[DEBUG] 21:01:47.849 shell_windows.go:WindowsRegistryKeyValue:206 → ColorizationColor(DWORD): 0xC400B7C3
[DEBUG] 21:01:47.854 shell.go:Shell:645 → process name: pwsh.exe
[TRACE] 21:01:47.854 shell.go:Shell() - 5.097ms
[DEBUG] 21:01:47.854 shell.go:Getenv:398 → 7.3.6
[TRACE] 21:01:47.854 shell.go:Getenv(POSH_SHELL_VERSION) - 0s
[DEBUG] 21:01:47.854 debug.go:PrintDebug:23 → Segment: Title
[TRACE] 21:01:47.855 shell_windows.go:Root() - 0s
[TRACE] 21:01:47.855 shell.go:Shell() - 0s
[TRACE] 21:01:47.855 shell.go:StatusCodes() - 0s
[TRACE] 21:01:47.855 shell_windows.go:IsWsl() - 0s
[DEBUG] 21:01:47.855 shell.go:TemplateCache:815 → environment: [ALLUSERSPROFILE=C:\ProgramData APPDATA=C:\Users\TarekSalha\AppData\Roaming ChocolateyInstall=C:\ProgramData\chocolatey ChocolateyLastPathUpdate=133290048037257411 CommonProgramFiles=C:\Program Files\Common Files CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files CommonProgramW6432=C:\Program Files\Common Files COMPUTERNAME=GFPLUS-PF4CB8N1 ComSpec=C:\Windows\system32\cmd.exe CONDA_PROMPT_MODIFIER=False DriverData=C:\Windows\System32\Drivers\DriverData HOMEDRIVE=C: HOMEPATH=\Users\TarekSalha IGCCSVC_DB=AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAnAyCCoTEy0KARSiuSzbtXQQAAAACAAAAAAAQZgAAAAEAACAAAAB4xskE7FoSrFklP+s06hTuyipxvqOSSkWjU5+Zfq1dFgAAAAAOgAAAAAIAACAAAABGr6A/YAz9+ksrPc2Ha0/nrby1P+fvXvqK0VBWRrddIWAAAAB7m8qoi0PVnwpgXAs0yqgHsDrY9z/tZ6FyvLXZsQeZ26ZZMjk7wqbhZqgCYuQKmUojriQGV+MLz4KWSYep7Qd2g4jV5sPTFi4PCKZ+4iWwzDsNDYu/QMvjjwIEpAHwmUFAAAAAT4vtr6e3WLvLP45sC21WrajOWOu8qr+GzXNBWARq4wH8qjlIMliw2wiCXha5IGFWfniWkYOmcaK5uPI7a3apCA== LOCALAPPDATA=C:\Users\TarekSalha\AppData\Local LOGONSERVER=\\GFPLUS-PF4CB8N1 NUMBER_OF_PROCESSORS=16 OneDrive=C:\Users\TarekSalha\OneDrive - Glasfaser Plus GmbH OneDriveCommercial=C:\Users\TarekSalha\OneDrive - Glasfaser Plus GmbH OS=Windows_NT Path=C:\Program Files\PowerShell\7;C:\Python39\Scripts\;C:\Python39\;C:\Windows;C:\Windows\system32;C:\Windows\System32\Wbem;C:\Windows\System32\OpenSSH\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Python311\Scripts\;C:\Python311\;C:\ProgramData\chocolatey\bin;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files\dotnet\;C:\Program Files (x86)\dotnet\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Docker\Docker\resources\bin;C:\Program Files (x86)\oh-my-posh\bin;C:\Program Files\Git\cmd;C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn\;C:\Program Files\Azure Data Studio\bin;C:\Program Files\nodejs\;C:\Program Files\PowerShell\7\;C:\Users\TarekSalha\AppData\Local\Microsoft\WindowsApps;C:\Users\TarekSalha\.dotnet\tools;C:\Users\TarekSalha\AppData\Roaming\npm;C:\Users\TarekSalha\AppData\Local\Programs\oh-my-posh\bin PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW;.CPL POSH_AZURE_ENABLED=False POSH_CURSOR_COLUMN=1 POSH_CURSOR_LINE=6 POSH_GIT_ENABLED=False POSH_INSTALLER=manual POSH_PID=21820 POSH_SHELL_VERSION=7.3.6 POSH_THEMES_PATH=C:\Users\TarekSalha\AppData\Local\Programs\oh-my-posh\themes POWERLINE_COMMAND=oh-my-posh POWERSHELL_DISTRIBUTION_CHANNEL=MSI:Windows 10 Enterprise PROCESSOR_ARCHITECTURE=AMD64 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 154 Stepping 3, GenuineIntel PROCESSOR_LEVEL=6 PROCESSOR_REVISION=9a03 ProgramData=C:\ProgramData ProgramFiles=C:\Program Files ProgramFiles(x86)=C:\Program Files (x86) ProgramW6432=C:\Program Files PSModulePath=C:\Users\TarekSalha\OneDrive - Glasfaser Plus GmbH\Dokumente\PowerShell\Modules;C:\Program Files\PowerShell\Modules;c:\program files\powershell\7\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules PUBLIC=C:\Users\Public SystemDrive=C: SystemRoot=C:\Windows TEMP=C:\Users\TAREKS~1\AppData\Local\Temp TMP=C:\Users\TAREKS~1\AppData\Local\Temp USERDOMAIN=AzureAD USERDOMAIN_ROAMINGPROFILE=AzureAD USERNAME=TarekSalha USERPROFILE=C:\Users\TarekSalha windir=C:\Windows WSLENV=WT_SESSION::WT_PROFILE_ID WT_PROFILE_ID={574e775e-4f2a-5b96-ac1e-a2962a402336} WT_SESSION=66ea6dc8-dd47-425e-a5f3-4e9a85267803 ZES_ENABLE_SYSMAN=1]
[TRACE] 21:01:47.855 shell.go:GOOS() - 0s
[DEBUG] 21:01:47.855 shell.go:Pwd:428 → C:\Users\TarekSalha
[TRACE] 21:01:47.855 shell.go:Pwd() - 0s
[DEBUG] 21:01:47.855 shell_windows.go:56 → C:\Users\TarekSalha
[TRACE] 21:01:47.855 shell.go:GOOS() - 0s
[TRACE] 21:01:47.855 shell.go:GOOS() - 0s
[TRACE] 21:01:47.855 shell.go:GOOS() - 0s
[TRACE] 21:01:47.855 shell.go:GOOS() - 0s
[TRACE] 21:01:47.855 shell.go:GOOS() - 0s
[TRACE] 21:01:47.855 shell.go:GOOS() - 0s
[TRACE] 21:01:47.855 shell.go:GOOS() - 0s
[TRACE] 21:01:47.855 shell.go:GOOS() - 0s
[TRACE] 21:01:47.855 shell.go:GOOS() - 0s
[TRACE] 21:01:47.855 shell.go:GOOS() - 0s
[TRACE] 21:01:47.855 shell.go:GOOS() - 0s
[TRACE] 21:01:47.855 shell.go:GOOS() - 0s
[TRACE] 21:01:47.855 shell.go:GOOS() - 0s
[DEBUG] 21:01:47.855 shell.go:User:549 → TarekSalha
[TRACE] 21:01:47.855 shell.go:User() - 0s
[DEBUG] 21:01:47.855 shell.go:Host:561 → GFPlus-PF4CB8N1
[TRACE] 21:01:47.855 shell.go:Host() - 0s
[TRACE] 21:01:47.855 shell.go:GOOS() - 0s
[DEBUG] 21:01:47.855 shell.go:Getenv:398 → NO DATA
[TRACE] 21:01:47.855 shell.go:Getenv(SHLVL) - 0s
[TRACE] 21:01:47.855 shell.go:TemplateCache() - 0s
[TRACE] 21:01:47.855 shell.go:Flags() - 0s
[DEBUG] 21:01:47.855 block.go:Debug:280 → Segment: session
[TRACE] 21:01:47.855 shell.go:Pwd() - 0s
[DEBUG] 21:01:47.855 shell_windows.go:56 → C:\Users\TarekSalha
[TRACE] 21:01:47.855 shell.go:GOOS() - 0s
[DEBUG] 21:01:47.855 shell.go:Getenv:398 → NO DATA
[TRACE] 21:01:47.855 shell.go:Getenv(SSH_CONNECTION) - 0s
[DEBUG] 21:01:47.855 shell.go:Getenv:398 → NO DATA
[TRACE] 21:01:47.855 shell.go:Getenv(SSH_CLIENT) - 0s
[TRACE] 21:01:47.855 shell.go:TemplateCache() - 0s
[TRACE] 21:01:47.856 shell.go:TemplateCache() - 0s
[TRACE] 21:01:47.856 shell.go:Shell() - 0s
[DEBUG] 21:01:47.856 block.go:Debug:280 → Segment: path
[TRACE] 21:01:47.856 shell.go:Pwd() - 0s
[DEBUG] 21:01:47.856 shell_windows.go:56 → C:\Users\TarekSalha
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:Pwd() - 0s
[TRACE] 21:01:47.856 shell.go:Shell() - 0s
[TRACE] 21:01:47.856 shell.go:Flags() - 0s
[DEBUG] 21:01:47.856 properties.go:GetBool:22 → mapped_locations_enabled: true
[DEBUG] 21:01:47.856 properties.go:GetString:28 → 
[DEBUG] 21:01:47.856 properties.go:GetString:28 → 
[DEBUG] 21:01:47.856 shell_windows.go:56 → C:\Users\TarekSalha
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[DEBUG] 21:01:47.856 properties.go:GetString:28 → ~
[DEBUG] 21:01:47.856 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[TRACE] 21:01:47.856 shell.go:PathSeparator() - 0s
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:PathSeparator() - 0s
[TRACE] 21:01:47.856 shell.go:PathSeparator() - 0s
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:PathSeparator() - 0s
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:PathSeparator() - 0s
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:PathSeparator() - 0s
[TRACE] 21:01:47.856 shell.go:Pwd() - 0s
[TRACE] 21:01:47.856 shell_windows.go:IsWsl() - 0s
[TRACE] 21:01:47.856 shell.go:StackCount() - 0s
[DEBUG] 21:01:47.856 win32_windows.go:isWriteable:299 → not current user or in group
[DEBUG] 21:01:47.856 win32_windows.go:isWriteable:303 → current user is member of S-1-5-32-544
[DEBUG] 21:01:47.856 win32_windows.go:isWriteable:311 ↓
    WRITE_DAC
    WRITE_OWNER
    SYNCHRONIZE
    DELETE
    READ_CONTROL
[DEBUG] 21:01:47.856 win32_windows.go:isWriteable:313 → user has write access
[TRACE] 21:01:47.856 shell_windows.go:DirIsWritable() - 572.9µs
[TRACE] 21:01:47.856 shell.go:TemplateCache() - 0s
[TRACE] 21:01:47.856 shell.go:TemplateCache() - 0s
[TRACE] 21:01:47.856 shell.go:Shell() - 0s
[DEBUG] 21:01:47.856 block.go:Debug:280 → Segment: git
[TRACE] 21:01:47.856 shell.go:Pwd() - 0s
[DEBUG] 21:01:47.856 shell_windows.go:56 → C:\Users\TarekSalha
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[TRACE] 21:01:47.856 shell.go:GOOS() - 0s
[DEBUG] 21:01:47.862 shell.go:CommandPath:600 → C:\Program Files\Git\cmd\git.exe
[TRACE] 21:01:47.862 shell.go:CommandPath(git.exe) - 5.5886ms
[TRACE] 21:01:47.862 shell.go:HasCommand(git.exe) - 5.5886ms
[TRACE] 21:01:47.862 shell.go:Pwd() - 0s
[ERROR] 21:01:47.862 shell.go:HasParentFilePath:733 → CreateFile .git: The system cannot find the file specified.
[TRACE] 21:01:47.862 shell.go:HasParentFilePath(.git) - 562.5µs
[DEBUG] 21:01:47.862 properties.go:GetBool:22 → fetch_bare_info: false
[DEBUG] 21:01:47.862 block.go:Debug:280 → Segment: root
[TRACE] 21:01:47.862 shell.go:Pwd() - 0s
[DEBUG] 21:01:47.862 shell_windows.go:56 → C:\Users\TarekSalha
[TRACE] 21:01:47.862 shell.go:GOOS() - 0s
[TRACE] 21:01:47.862 shell_windows.go:Root() - 0s
[DEBUG] 21:01:47.862 block.go:Debug:280 → Segment: exit
[DEBUG] 21:01:47.862 properties.go:GetString:28 → {{ .Code }}
[TRACE] 21:01:47.862 shell.go:Pwd() - 0s
[DEBUG] 21:01:47.862 shell_windows.go:56 → C:\Users\TarekSalha
[TRACE] 21:01:47.862 shell.go:GOOS() - 0s
[TRACE] 21:01:47.862 shell.go:StatusCodes() - 0s
[TRACE] 21:01:47.862 shell.go:TemplateCache() - 0s
[DEBUG] 21:01:47.862 properties.go:GetBool:22 → always_enabled: true
[TRACE] 21:01:47.862 shell.go:TemplateCache() - 0s
[TRACE] 21:01:47.862 shell.go:TemplateCache() - 0s
[TRACE] 21:01:47.862 shell.go:Shell() - 0s
[TRACE] 21:01:47.863 shell.go:TemplateCache() - 0s
[TRACE] 21:01:47.863 shell.go:Flags() - 0s
[DEBUG] 21:01:47.863 block.go:Debug:280 → Segment: node
[TRACE] 21:01:47.863 shell.go:Pwd() - 0s
[DEBUG] 21:01:47.863 shell_windows.go:56 → C:\Users\TarekSalha
[TRACE] 21:01:47.863 shell.go:GOOS() - 0s
[DEBUG] 21:01:47.863 properties.go:GetStringArray:52 → extensions: [*.js *.ts package.json .nvmrc pnpm-workspace.yaml .pnpmfile.cjs .npmrc .vue]
[DEBUG] 21:01:47.863 properties.go:GetStringArray:52 → folders: []
[DEBUG] 21:01:47.863 properties.go:GetBool:22 → home_enabled: false
[TRACE] 21:01:47.863 shell.go:Pwd() - 0s
[DEBUG] 21:01:47.863 shell_windows.go:56 → C:\Users\TarekSalha
[DEBUG] 21:01:47.863 block.go:Debug:280 → Segment: go
[TRACE] 21:01:47.863 shell.go:Pwd() - 0s
[DEBUG] 21:01:47.863 shell_windows.go:56 → C:\Users\TarekSalha
[TRACE] 21:01:47.863 shell.go:GOOS() - 0s
[DEBUG] 21:01:47.863 properties.go:GetStringArray:52 → extensions: [*.go go.mod]
[DEBUG] 21:01:47.863 properties.go:GetStringArray:52 → folders: []
[DEBUG] 21:01:47.863 properties.go:GetBool:22 → home_enabled: false
[TRACE] 21:01:47.863 shell.go:Pwd() - 0s
[DEBUG] 21:01:47.863 shell_windows.go:56 → C:\Users\TarekSalha
[DEBUG] 21:01:47.863 block.go:Debug:280 → Segment: python
[DEBUG] 21:01:47.863 properties.go:GetString:28 → files
[TRACE] 21:01:47.863 shell.go:Pwd() - 0s
[DEBUG] 21:01:47.863 shell_windows.go:56 → C:\Users\TarekSalha
[TRACE] 21:01:47.863 shell.go:GOOS() - 0s
[DEBUG] 21:01:47.863 properties.go:GetStringArray:52 → extensions: [*.py *.ipynb pyproject.toml venv.bak]
[DEBUG] 21:01:47.863 properties.go:GetStringArray:52 → folders: [.venv venv virtualenv env venv-win pyenv-win]
[DEBUG] 21:01:47.863 properties.go:GetBool:22 → home_enabled: false
[TRACE] 21:01:47.863 shell.go:Pwd() - 0s
[DEBUG] 21:01:47.863 shell_windows.go:56 → C:\Users\TarekSalha
[DEBUG] 21:01:47.863 block.go:Debug:280 → Segment: shell
[TRACE] 21:01:47.863 shell.go:Pwd() - 0s
[DEBUG] 21:01:47.863 shell_windows.go:56 → C:\Users\TarekSalha
[TRACE] 21:01:47.863 shell.go:GOOS() - 0s
[DEBUG] 21:01:47.863 properties.go:GetKeyValueMap:46 → mapped_shell_names: map[]
[TRACE] 21:01:47.863 shell.go:Shell() - 0s
[TRACE] 21:01:47.863 shell.go:Flags() - 0s
[TRACE] 21:01:47.863 shell.go:TemplateCache() - 0s
[TRACE] 21:01:47.863 shell.go:TemplateCache() - 0s
[TRACE] 21:01:47.863 shell.go:Shell() - 0s
[DEBUG] 21:01:47.863 block.go:Debug:280 → Segment: time
[TRACE] 21:01:47.863 shell.go:Pwd() - 0s
[DEBUG] 21:01:47.863 shell_windows.go:56 → C:\Users\TarekSalha
[TRACE] 21:01:47.863 shell.go:GOOS() - 0s
[DEBUG] 21:01:47.863 properties.go:GetString:28 → 15:04:05
[TRACE] 21:01:47.863 shell.go:TemplateCache() - 0s
[TRACE] 21:01:47.863 shell.go:TemplateCache() - 0s
[TRACE] 21:01:47.863 shell.go:Shell() - 0s
[DEBUG] 21:01:47.863 shell.go:Getenv:398 → C:\Users\TarekSalha\AppData\Local
[TRACE] 21:01:47.863 shell.go:Getenv(LOCALAPPDATA) - 0s
[TRACE] 21:01:47.863 shell_windows.go:CachePath() - 0s
[TRACE] 21:01:47.863 shell.go:Flags() - 0s
JanDeDobbeleer commented 1 year ago

@TarekSalha you're using the out of the box configuration which doesn't have an azure segment. And as you probably don't have the Azure PowerShell module installed, enabling it will indeed break prompt invocation.

You'll need to export and edit the configuration to include the azure segment.

TarekSalha commented 1 year ago

Hi @JanDeDobbeleer, thanks for your swift answer. Additionally, I also loaded the azure powershell module and now setting the environment params does not break the theme anymore. So far, so good... Still, I am slightly confused. From the docs, it is said, that if I put this line oh-my-posh init pwsh --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/cloud-native-azure.omp.json' | Invoke-Expression into my profile, then it will load the specified azure native theme. Why am I still using the out-of-the-box theme as suggested from your answer?

JanDeDobbeleer commented 1 year ago

@TarekSalha probably it fails to download the config. You can see that when running oh-my-posh debug --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/cloud-native-azure.omp.json' --shell pwsh

TarekSalha commented 1 year ago

using a local file instead, it works now as expected, thanks for the support!

github-actions[bot] commented 9 months ago

This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues. If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.