Closed dcnieho closed 1 year ago
@dcnieho you're right, you do have a stash entry:
2023/01/03 10:18:41 FileContent
0000000000000000000000000000000000000000 051da156a137b64a1d68209c72ca8a30be32e42e Diederick Niehorster <dcnieho@gmail.com> 1672701589 +0100 WIP on dev: 9a021c6 Help beginners install opencv-python
2023/01/03 10:18:41 FileContent: 537.9µs, args: C:\Users\huml-dkn\Desktop\imgui_bundle\.git/logs/refs/stash
So why is the count zero when the git segment is drawn for my prompt, am i doing something wrong? I find the disconnect between the output of the segment in debug (which does show 1) and the actual prompt strange (and would like to see my stash count :p)
@dcnieho you're right, I need to debug this. Stay tuned 😉
I just realized i left out some very important information, i am using posh-git, and my profile includes $env:POSH_GIT_ENABLED = $true
. If i comment out that line in my profile, things work, i see my stash count on my prompt. All the things posted above are with posh-git integration enabled.
I would like to have posh-git for autocompletion of the git command line so it needs to be loaded with the above line (right?). Or can i load posh-git separately since i only want it for the autocomplete (there seems to be no point to using posh-git instead of your integration and they perform similarly, correct?)?
@dcnieho ah, good because I couldn't reproduce the issue. When using posh-git, please only use that one as otherwise your prompt will be super slow due to duplicate git calls. I don't think we added StashCount
info from posh-git before, I only added that last week (not your version). You can update to the latest by using the correct installer for your architecture from the releases page, it's 100% compatible with the Store version so you don't need to do anything after that.
Sorry about that! I'm on version 12.34.5 ah confirmed by the log output, but still seeing the same issue. In debug output i see the stashcount but the prompt doesn't include it. When using the posh-git integration, which of these properties should i keep?
"fetch_status": true,
"fetch_stash_count": true,
"fetch_upstream_icon": true,
"fetch_worktree_count": true
It seems i want to keep at least fetch_upstream_icon
, otherwise i lose that one.
FWIW, removing fetch_stash_count
doesn't change the issue, i still see the stash count in the debug output but not on the actual prompt
@dcnieho can you show me your debug output, I need that posh-git output for this so I can quickly add that test case. Also fetch_stash_count
is no longer needed (and removed from the docs, but I do see the sample still has it so will remove).
of course! Here a screen shot of the first bit, and the whole log:
Version: 12.34.5
Segments:
ConsoleTitle(true) - 1 ms - pwsh @ imgui_bundle
os(true) - 0 ms -
session(true) - 0 ms - huml-dkn
cmake(true) - 5 ms - cmake
git(true) - 4 ms - imgui_bundle @ dev ( 1)
python(true) - 9 ms - sys 3.10.9
exit(true) - 1 ms -
executiontime(true) - 0 ms - 0ms
text(true) - 0 ms - ╭─
time(true) - 0 ms - 12:21:25 | 3 Jan, Tuesday |
path(true) - 1 ms - C:\Users\huml-dkn\Desktop\imgui_bundle
text(true) - 0 ms - ╰─
root(false) - 0 ms -
exit(true) - 0 ms - ff
Run duration: 37.904ms
Cache path: C:\Users\huml-dkn\AppData\Local\oh-my-posh
Config path: C:\Users\huml-dkn\Documents\PowerShell\thewickedd.omp.json
Logs:
2023/01/03 12:21:25 Getenv
C:\Users\huml-dkn\AppData\Local
2023/01/03 12:21:25 Getenv: 0s, args: LOCALAPPDATA
2023/01/03 12:21:25 CachePath: 0s
2023/01/03 12:21:25 Getenv
C:\Users\huml-dkn\Documents\PowerShell\thewickedd.omp.json
2023/01/03 12:21:25 Getenv: 0s, args: POSH_THEME
2023/01/03 12:21:25 Shell
process name: pwsh.exe
2023/01/03 12:21:25 Shell: 9.4315ms
2023/01/03 12:21:25 resolveConfigPath: 9.4315ms
2023/01/03 12:21:25 Init: 11.7209ms
2023/01/03 12:21:25 Flags: 0s
2023/01/03 12:21:25 config.loadConfig: 616µs
2023/01/03 12:21:25 Flags: 0s
2023/01/03 12:21:25 Getenv
2023/01/03 12:21:25 Getenv: 0s, args: OMP_CACHE_DISABLED
2023/01/03 12:21:25 WindowsRegistryKeyValue: 0s, args: HKEY_CURRENT_USER\Software\Microsoft\Windows\DWM\ColorizationColor
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 WindowsRegistryKeyValue
ColorizationColor(DWORD): 0xC4DA3B01
2023/01/03 12:21:25 Root: 0s
2023/01/03 12:21:25 Shell: 0s
2023/01/03 12:21:25 ErrorCode: 0s
2023/01/03 12:21:25 IsWsl: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 Home
C:\Users\huml-dkn
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 User
huml-dkn
2023/01/03 12:21:25 User: 0s
2023/01/03 12:21:25 Host
HUML-DKN
2023/01/03 12:21:25 Host: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 Flags: 0s
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 Home
C:\Users\huml-dkn
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 Shell: 0s
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 Home
C:\Users\huml-dkn
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 Getenv
2023/01/03 12:21:25 Getenv: 0s, args: SSH_CONNECTION
2023/01/03 12:21:25 Getenv
2023/01/03 12:21:25 Getenv: 0s, args: SSH_CLIENT
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 Shell: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 Home
C:\Users\huml-dkn
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 Home
C:\Users\huml-dkn
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 HasFiles: 0s, args: *.cmake
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 HasFiles: 0s, args: CMakeLists.txt
2023/01/03 12:21:25 CommandPath
exec: "cmake": executable file not found in %PATH%
2023/01/03 12:21:25 CommandPath: 5.9044ms, args: cmake
2023/01/03 12:21:25 HasCommand: 5.9044ms, args: cmake
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 Shell: 0s
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 Home
C:\Users\huml-dkn
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 CommandPath
C:\Program Files\Git\cmd\git.exe
2023/01/03 12:21:25 CommandPath: 3.8654ms, args: git.exe
2023/01/03 12:21:25 HasCommand: 3.8654ms, args: git.exe
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 HasParentFilePath: 0s, args: .git
2023/01/03 12:21:25 Home
C:\Users\huml-dkn
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 Getenv
2023/01/03 12:21:25 Getenv: 0s, args: POSH_GIT_STATUS
2023/01/03 12:21:25 FileContent
ref: refs/heads/dev
2023/01/03 12:21:25 FileContent: 0s, args: C:\Users\huml-dkn\Desktop\imgui_bundle\.git/HEAD
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 FileContent
0000000000000000000000000000000000000000 051da156a137b64a1d68209c72ca8a30be32e42e Diederick Niehorster <dcnieho@gmail.com> 1672701589 +0100 WIP on dev: 9a021c6 Help beginners install opencv-python
2023/01/03 12:21:25 FileContent: 0s, args: C:\Users\huml-dkn\Desktop\imgui_bundle\.git/logs/refs/stash
2023/01/03 12:21:25 Shell: 0s
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 Home
C:\Users\huml-dkn
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 Home
C:\Users\huml-dkn
2023/01/03 12:21:25 Getenv
2023/01/03 12:21:25 Getenv: 0s, args: VIRTUAL_ENV
2023/01/03 12:21:25 Getenv
2023/01/03 12:21:25 Getenv: 0s, args: CONDA_ENV_PATH
2023/01/03 12:21:25 Getenv
2023/01/03 12:21:25 Getenv: 0s, args: CONDA_DEFAULT_ENV
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 HasFiles: 502.9µs, args: *.py
2023/01/03 12:21:25 CommandPath
C:\Program Files\Python310\python.exe
2023/01/03 12:21:25 CommandPath: 551.5µs, args: python
2023/01/03 12:21:25 Getenv
2023/01/03 12:21:25 Getenv: 0s, args: PYENV_ROOT
2023/01/03 12:21:25 CommandPath
C:\Program Files\Python310\python.exe
2023/01/03 12:21:25 CommandPath: 0s, args: python
2023/01/03 12:21:25 HasCommand: 0s, args: python
2023/01/03 12:21:25 RunCommand
Python 3.10.9
2023/01/03 12:21:25 RunCommand: 7.849ms, args: python --version
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 Shell: 0s
2023/01/03 12:21:25 Flags: 0s
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 Home
C:\Users\huml-dkn
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 ErrorCode: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 Shell: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 Home
C:\Users\huml-dkn
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 ExecutionTime: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 Shell: 0s
2023/01/03 12:21:25 Flags: 0s
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 Home
C:\Users\huml-dkn
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 Shell: 0s
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 Home
C:\Users\huml-dkn
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 Shell: 0s
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 Home
C:\Users\huml-dkn
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 Shell: 0s
2023/01/03 12:21:25 Flags: 0s
2023/01/03 12:21:25 PathSeparator: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 PathSeparator: 0s
2023/01/03 12:21:25 PathSeparator: 0s
2023/01/03 12:21:25 PathSeparator: 0s
2023/01/03 12:21:25 PathSeparator: 0s
2023/01/03 12:21:25 PathSeparator: 0s
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 IsWsl: 0s
2023/01/03 12:21:25 StackCount: 0s
2023/01/03 12:21:25 isWriteable
not current user or in group
2023/01/03 12:21:25 isWriteable
current user is member of S-1-5-32-544
2023/01/03 12:21:25 isWriteable
WRITE_DAC
WRITE_OWNER
SYNCHRONIZE
DELETE
READ_CONTROL
2023/01/03 12:21:25 isWriteable
user has write access
2023/01/03 12:21:25 DirIsWritable: 1.0488ms
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 Shell: 0s
2023/01/03 12:21:25 Flags: 0s
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 Home
C:\Users\huml-dkn
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 Shell: 0s
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 Home
C:\Users\huml-dkn
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 Root: 0s
2023/01/03 12:21:25 Pwd
C:\Users\huml-dkn\Desktop\imgui_bundle
2023/01/03 12:21:25 Pwd: 0s
2023/01/03 12:21:25 Home
C:\Users\huml-dkn
2023/01/03 12:21:25 GOOS: 0s
2023/01/03 12:21:25 ErrorCode: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 Shell: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 Getenv
C:\Users\huml-dkn\AppData\Local
2023/01/03 12:21:25 Getenv: 0s, args: LOCALAPPDATA
2023/01/03 12:21:25 CachePath: 0s
2023/01/03 12:21:25 Flags: 0s
@dcnieho this isn't loading posh-git as the POSH_GIT_STATUS
env var is empty.
2023/01/03 12:21:25 Getenv
2023/01/03 12:21:25 Getenv: 0s, args: POSH_GIT_STATUS
I can't explain this btw, there's no difference in debug and prompt logic for oh-my-posh....
The only way this can happen is that you initialise a different version of oh-my-posh in your $PROFILE
.
@JanDeDobbeleer Very strange. I have only one oh-my-posh executable on my pc, installed with winget.
This is what all that is relevant in my $PROFILE
:
$configPath = Join-Path -Path (Split-Path $PROFILE -Parent) -ChildPath "thewickedd.omp.json"
oh-my-posh init pwsh --config $configPath | Invoke-Expression
$env:POSH_GIT_ENABLED = $true
$env:VIRTUAL_ENV_DISABLE_PROMPT = 1 # stop python venv activate from changing prompt
should i be doing Import-Module -Global posh-git
somewhere? If so, before or after loading oh-my-posh? $env:POSH_GIT_ENABLED = $true
makes it so that posh-git gets loaded, right?
@dcnieho yes, you need to import that indeed. Preferably before oh-my-posh.
Ok, that still didn't fix it. There are possibly multiple problems here.
$env:POSH_GIT_STATUS
is empty$GitPromptSettings.EnableStashStatus
. That for some reason is false for me.So, see this on a fresh pwsh:
I do not know why problem 1 occurs. But i have also noticed that my transient prompt doesn't work until i manually reload the oh-my-posh config again by issuing oh-my-posh init pwsh --config $configPath | Invoke-Expression
again. Manually reloading however doesn't lead to $env:POSH_GIT_STATUS
being filled. How the prompt works at all without $env:POSH_GIT_STATUS
being filled, i do not know :p
why the debug doesn't match the prompt i do not know. But i do notice in the debug output:
2023/01/03 12:21:25 Getenv: 0s, args: POSH_GIT_STATUS
2023/01/03 12:21:25 FileContent
ref: refs/heads/dev
2023/01/03 12:21:25 FileContent: 0s, args: C:\Users\huml-dkn\Desktop\imgui_bundle\.git/HEAD
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 TemplateCache: 0s
2023/01/03 12:21:25 FileContent
0000000000000000000000000000000000000000 051da156a137b64a1d68209c72ca8a30be32e42e Diederick Niehorster <dcnieho@gmail.com> 1672701589 +0100 WIP on dev: 9a021c6 Help beginners install opencv-python
2023/01/03 12:21:25 FileContent: 0s, args: C:\Users\huml-dkn\Desktop\imgui_bundle\.git/logs/refs/stash
2023/01/03 12:21:25 Shell: 0s
Why is it opening C:\Users\huml-dkn\Desktop\imgui_bundle\.git/logs/refs/stash
if the info should come from git-posh, some fallback? That only gets run in debug?
But i have also noticed that my transient prompt doesn't work until i manually reload the oh-my-posh config again by issuing oh-my-posh init pwsh --config $configPath | Invoke-Expression again.
The transient prompt should be changeable without a reload.
How the prompt works at all without $env:POSH_GIT_STATUS being filled, i do not know :p
@dcnieho your prompt works with posh-git as you enable that setting and you get a working prompt. And I know why debug doesn't work for posh-git, it isn't loaded when using the debug command. It's removed as soon as we render the prompt (see here).
So in any case, setting $GitPromptSettings.EnableStashStatus = $true
in my profile makes things work. I think that should either be documented, or done by oh my posh when wanted (perhaps again allow setting fetch_stash_count
?).
But i have also noticed that my transient prompt doesn't work until i manually reload the oh-my-posh config again by issuing oh-my-posh init pwsh --config $configPath | Invoke-Expression again.
The transient prompt should be changeable without a reload.
Indeed it is, I've noticed that now while playing with it. The issue i have is it doesn't work on first load. I'll post a separate issue for that.
How the prompt works at all without $env:POSH_GIT_STATUS being filled, i do not know :p
@dcnieho your prompt works with posh-git as you enable that setting and you get a working prompt. And I know why debug doesn't work for posh-git, it isn't loaded when using the debug command. It's removed as soon as we render the prompt (see here).
Ah ok, that explains that :) Indeed, it is working!
Indeed it is, I've noticed that now while playing with it. The issue i have is it doesn't work on first load. I'll post a separate issue for that.
@dcnieho replied, once again config ;-)
So in any case, setting
$GitPromptSettings.EnableStashStatus = $true
in my profile makes things work. I think that should either be documented, or done by oh my posh when wanted (perhaps again allow settingfetch_stash_count
?).
Do you think documentation is best, or do we need to re-introduce the fetch_stash_count
property which, if using posh-git, will set the flag for you?
@dcnieho that's not possible as it requires parsing the config from PowerShell which we don't do. I expect that people read the posh-git manual 😅
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.
Code of Conduct
What happened?
I am in a repository that has one stash item. I am trying to conditionally draw the number of stashes with
{{ if gt .StashCount 0 }}<lightYellow> (\uf692 {{ .StashCount }})</>{{ end }}
, but it does not show up. Indeed, I see that stashcount is 0 when i remove the conditional from that template so that it is always printed.Strangely, atop the debug output below, it does show the segment as being rendered with 1 stash item, but in the actual prompt it is zero.
Theme
Note that i am not using the latest oh my posh as i installed the windows store version so its kept automatically up to date (in theory apparently 😛).
Relevant part:
What OS are you seeing the problem on?
Windows
Which shell are you using?
powershell
Log output