JanDeDobbeleer / oh-my-posh

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

If I try to use a "poshgit" segment, debug reports poshgit(false) #2355

Closed pfmoore closed 2 years ago

pfmoore commented 2 years ago

Code of Conduct

What happened?

I altered my config to use the poshgit segment in place of git. I have Posh-Git installed and imported in my profile before oh-my-posh. My config has a copy of the default poshgit settings:

        {
          "type": "poshgit",
          "style": "powerline",
          "powerline_symbol": "\uE0B0",
          "foreground": "#ffffff",
          "background": "#0077c2"
        },

If I run oh-my-posh debug when in a git checkout, the output shows:

Version: 7.94.0

Segments:

ConsoleTitle(true) -   0 ms - oh-my-posh in pkg_metadata
session(true)  -   0 ms -  Gustav 
path(true)     -   0 ms -   pkg_metadata
poshgit(false) -   0 ms -
root(false)    -   0 ms -
exit(true)     -   0 ms -   
node(false)    -   0 ms -
go(false)      -   0 ms -
python(true)   -  39 ms - 
shell(true)    -   0 ms - in oh-my-posh
time(true)     -   0 ms - at 12:16:53

Run duration: 55.5858ms

I can't find any instructions on how to

Theme

A custom config. To ensure I didn't have an issue with something else in my config, I replaced it with a copy of jandedobbeleer.omp.json and just replaced the git section in that with the poshgit section shown above.

What OS are you seeing the problem on?

Windows

Which shell are you using?

powershell

Log output

Version: 7.94.0

Segments:

ConsoleTitle(true)   -   0 ms - oh-my-posh in pkg_metadata
session(true)        -   0 ms -  Gustav 
path(true)           -   1 ms -    pkg_metadata 
poshgit(false)       -   0 ms - 
node(false)          -   0 ms - 
go(false)            -   0 ms - 
julia(false)         -   0 ms - 
python(true)         -  40 ms -    
ruby(false)          -   0 ms - 
azfunc(false)        -   0 ms - 
aws(false)           -   0 ms - 
root(false)          -   0 ms - 
executiontime(true)  -   0 ms -  ﮫ0ms⠀
exit(true)           -   1 ms -   
shell(true)          -   0 ms -   oh-my-posh 
ytm(false)           -  34 ms - 
battery(true)        -   8 ms -   100 
time(true)           -   0 ms -  12:25:42 

Run duration: 97.3423ms

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

Config path: C:\Users\Gustav\AppData\Local\oh-my-posh\config.omp.json

Logs:

2022/05/31 12:25:42 debug: Getenv
C:\Users\Gustav\AppData\Local
2022/05/31 12:25:42 Getenv duration: 0s, args: LOCALAPPDATA
2022/05/31 12:25:42 CachePath duration: 636.9µs, args: 
2022/05/31 12:25:42 debug: Getenv
C:\Users\Gustav\AppData\Local\oh-my-posh\config.omp.json
2022/05/31 12:25:42 Getenv duration: 0s, args: POSH_THEME
2022/05/31 12:25:42 Shell duration: 9.3727ms, args: 
2022/05/31 12:25:42 resolveConfigPath duration: 9.3727ms, args: 
2022/05/31 12:25:42 Init duration: 10.0096ms, args: 
2022/05/31 12:25:42 Flags duration: 0s, args: 
2022/05/31 12:25:42 config.loadConfig duration: 985.8µs, args: 
2022/05/31 12:25:42 Flags duration: 0s, args: 
2022/05/31 12:25:42 debug: Getenv

2022/05/31 12:25:42 Getenv duration: 0s, args: OMP_CACHE_DISABLED
2022/05/31 12:25:42 WindowsRegistryKeyValue duration: 0s, args: HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor
2022/05/31 12:25:42 debug: WindowsRegistryKeyValue
WindowsRegistryKeyValue: root:"HKEY_CURRENT_USER", path:"Software\Microsoft\Windows\DWM", key:"ColorizationColor"
2022/05/31 12:25:42 debug: WindowsRegistryKeyValue
success, DWORD, 0xC40078D4
2022/05/31 12:25:42 Root duration: 0s, args: 
2022/05/31 12:25:42 Shell duration: 0s, args: 
2022/05/31 12:25:42 ErrorCode duration: 0s, args: 
2022/05/31 12:25:42 IsWsl duration: 0s, args: 
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: User
Gustav
2022/05/31 12:25:42 User duration: 0s, args: 
2022/05/31 12:25:42 debug: Host
Teemo
2022/05/31 12:25:42 Host duration: 0s, args: 
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 Flags duration: 0s, args: 
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 debug: Getenv

2022/05/31 12:25:42 Getenv duration: 0s, args: SSH_CONNECTION
2022/05/31 12:25:42 debug: Getenv

2022/05/31 12:25:42 Getenv duration: 0s, args: SSH_CLIENT
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 Shell duration: 0s, args: 
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 Flags duration: 0s, args: 
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 IsWsl duration: 0s, args: 
2022/05/31 12:25:42 StackCount duration: 0s, args: 
2022/05/31 12:25:42 DirIsWritable duration: 0s, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 Shell duration: 0s, args: 
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 debug: Getenv

2022/05/31 12:25:42 Getenv duration: 0s, args: POSH_GIT_STATUS
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFiles
false
2022/05/31 12:25:42 HasFiles duration: 0s, args: *.js
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFiles
false
2022/05/31 12:25:42 HasFiles duration: 0s, args: *.ts
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFiles
false
2022/05/31 12:25:42 HasFiles duration: 0s, args: package.json
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFiles
false
2022/05/31 12:25:42 HasFiles duration: 0s, args: .nvmrc
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFiles
false
2022/05/31 12:25:42 HasFiles duration: 0s, args: pnpm-workspace.yaml
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFiles
false
2022/05/31 12:25:42 HasFiles duration: 0s, args: .pnpmfile.cjs
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFiles
false
2022/05/31 12:25:42 HasFiles duration: 0s, args: .npmrc
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFiles
false
2022/05/31 12:25:42 HasFiles duration: 0s, args: .vue
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFiles
false
2022/05/31 12:25:42 HasFiles duration: 0s, args: *.go
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFiles
false
2022/05/31 12:25:42 HasFiles duration: 0s, args: go.mod
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFiles
false
2022/05/31 12:25:42 HasFiles duration: 0s, args: *.jl
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFiles
true
2022/05/31 12:25:42 HasFiles duration: 0s, args: *.py
2022/05/31 12:25:42 debug: Getenv
C:\Users\Gustav\AppData\Local
2022/05/31 12:25:42 Getenv duration: 0s, args: LOCALAPPDATA
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFilesInDir
false
2022/05/31 12:25:42 HasFilesInDir duration: 0s, args: python.exe
2022/05/31 12:25:42 error: CommandPath
no Windows Store App
2022/05/31 12:25:42 HasCommand duration: 10.1144ms, args: python
2022/05/31 12:25:42 debug: Getenv
C:\Users\Gustav\AppData\Local
2022/05/31 12:25:42 Getenv duration: 0s, args: LOCALAPPDATA
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFilesInDir
false
2022/05/31 12:25:42 HasFilesInDir duration: 0s, args: python3.exe
2022/05/31 12:25:42 error: CommandPath
no Windows Store App
2022/05/31 12:25:42 HasCommand duration: 8.8417ms, args: python3
2022/05/31 12:25:42 debug: Getenv
C:\Users\Gustav\AppData\Local
2022/05/31 12:25:42 Getenv duration: 0s, args: LOCALAPPDATA
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFilesInDir
false
2022/05/31 12:25:42 HasFilesInDir duration: 0s, args: python.exe
2022/05/31 12:25:42 error: CommandPath
no Windows Store App
2022/05/31 12:25:42 HasCommand duration: 8.9019ms, args: python
2022/05/31 12:25:42 debug: Getenv
C:\Users\Gustav\AppData\Local
2022/05/31 12:25:42 Getenv duration: 0s, args: LOCALAPPDATA
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFilesInDir
false
2022/05/31 12:25:42 HasFilesInDir duration: 0s, args: python3.exe
2022/05/31 12:25:42 error: CommandPath
no Windows Store App
2022/05/31 12:25:42 HasCommand duration: 9.4759ms, args: python3
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 Shell duration: 0s, args: 
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFiles
false
2022/05/31 12:25:42 HasFiles duration: 0s, args: *.rb
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFiles
false
2022/05/31 12:25:42 HasFiles duration: 0s, args: Rakefile
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFiles
false
2022/05/31 12:25:42 HasFiles duration: 0s, args: Gemfile
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFiles
false
2022/05/31 12:25:42 HasFiles duration: 0s, args: host.json
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFiles
false
2022/05/31 12:25:42 HasFiles duration: 0s, args: local.settings.json
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 PathSeparator duration: 0s, args: 
2022/05/31 12:25:42 debug: HasFiles
false
2022/05/31 12:25:42 HasFiles duration: 0s, args: function.json
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 debug: Getenv

2022/05/31 12:25:42 Getenv duration: 0s, args: AWS_VAULT
2022/05/31 12:25:42 debug: Getenv

2022/05/31 12:25:42 Getenv duration: 0s, args: AWS_PROFILE
2022/05/31 12:25:42 debug: Getenv

2022/05/31 12:25:42 Getenv duration: 0s, args: AWS_REGION
2022/05/31 12:25:42 debug: Getenv

2022/05/31 12:25:42 Getenv duration: 0s, args: AWS_DEFAULT_REGION
2022/05/31 12:25:42 debug: Getenv

2022/05/31 12:25:42 Getenv duration: 0s, args: AWS_CONFIG_FILE
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 error: FileContent
open C:\Users\Gustav/.aws/config: The system cannot find the file specified.
2022/05/31 12:25:42 FileContent duration: 0s, args: C:\Users\Gustav/.aws/config
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 Root duration: 0s, args: 
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 ExecutionTime duration: 0s, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 Shell duration: 0s, args: 
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 ErrorCode duration: 0s, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 Shell duration: 0s, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 Flags duration: 0s, args: 
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 Shell duration: 0s, args: 
2022/05/31 12:25:42 Flags duration: 0s, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 Shell duration: 0s, args: 
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 error: HTTPRequest
Get "http://127.0.0.1:9863/query": context deadline exceeded
2022/05/31 12:25:42 HTTPRequest duration: 34.7194ms, args: http://127.0.0.1:9863/query
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 IsWsl duration: 0s, args: 
2022/05/31 12:25:42 BatteryInfo duration: 7.8801ms, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 Shell duration: 0s, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 debug: Pwd
C:\Work\Projects\pkg_metadata
2022/05/31 12:25:42 Pwd duration: 0s, args: 
2022/05/31 12:25:42 debug: Home
C:\Users\Gustav
2022/05/31 12:25:42 GOOS duration: 0s, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 TemplateCache duration: 0s, args: 
2022/05/31 12:25:42 Shell duration: 0s, args: 
2022/05/31 12:25:42 debug: Getenv
C:\Users\Gustav\AppData\Local
2022/05/31 12:25:42 Getenv duration: 0s, args: LOCALAPPDATA
2022/05/31 12:25:42 CachePath duration: 0s, args: 
2022/05/31 12:25:42 Flags duration: 0s, args:
JanDeDobbeleer commented 2 years ago

@pfmoore there seems to be something lacking in the docs. You need to set the following environment variable: $env:POSH_GIT_ENABLED = $true

pfmoore commented 2 years ago

Ah cool, thanks. I did try to check the docs and didn't see that. I found it now, it's under the docs for the "git" (not "poshgit") segment.

JanDeDobbeleer commented 2 years ago

Reopening as I will fix that!

pfmoore commented 2 years ago

Actually, even now that I've set $env:POSH_GIT_ENABLED it seems to behave weirdly - it always puts the Posh-Git status at the start of the prompt line, instead of where I position it in the template. Is that to be expected?

Also, oh-my-posh debug still shows it as poshgit(false) all the time - I guess that may be because it needs fancy integration with the Powershell environment that debug doesn't have, but of so, how do I check whether the performance benefit of using it is worth it over just using the git segment?

I will say that I've just discovered that if I leave fetch_status at its default of false, the git segment is actually plenty fast enough, so I'm probably not going to bother with poshgit anyway. As a result this is mostly just theoretical to me at this point, so don't spend too much time on it!

JanDeDobbeleer commented 2 years ago

@pfmoore make sure to update posh-git as they fixed something in that area. Also, add oh-my-posh before importing posh-git.

pfmoore commented 2 years ago

Ah! I was importing posh-git first. (I did also have an old version of posh-git, but I'd spotted that and updated it and still had the issue).

github-actions[bot] commented 8 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.