JanDeDobbeleer / oh-my-posh

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

Windows Git Bash - wrong path separator #1441

Closed jakubnavratil closed 2 years ago

jakubnavratil commented 2 years ago

Code of Conduct

What happened?

When using path style "agnoster", which uses os.PathSeparator in GitBash on Windows, path is not splitted into segments. Same thing works correctly in powershell on the same system.

I looked into this and failed to find solution other then submitting this issue. Maybe env.getPathSeperator() could be using some detection for this case?

Theme

{ "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "osc99": true, "final_space": true, "console_title": true, "blocks": [ { "type": "prompt", "alignment": "left", "segments": [ { "type": "os", "style": "diamond", "foreground": "#ffffff", "background": "#c44569", "leading_diamond": "\uE0B6", "trailing_diamond": "", "properties": { "prefix": "", "windows": "\uE62A", "postfix": " " } }, { "type": "path", "style": "powerline", "trailing_diamond": "\uE0B0", "foreground": "#ffffff", "background": "#c44569", "properties": { "folder_separator_icon": " <#011627>\uE0B1</> ", "home_icon": "\uf7db ", "folder_icon": "\uf07c ", "style": "agnoster", "enable_hyperlink": true } }, { "type": "node", "style": "powerline", "powerline_symbol": "\uE0B0", "foreground": "#ffffff", "background": "#6CA35E", "properties": { "prefix": " \uE718 " } }, { "type": "git", "style": "powerline", "powerline_symbol": "\uE0B0", "foreground": "#193549", "background": "#caffbf", "background_templates": [ "{{ if or (.Working.Changed) (.Staging.Changed) }}#FCA17D{{ end }}", "{{ if and (gt .Ahead 0) (gt .Behind 0) }}#f26d50{{ end }}", "{{ if gt .Ahead 0 }}#89d1dc{{ end }}", "{{ if gt .Behind 0 }}#f17c37{{ end }}" ], "properties": { "fetch_upstream_icon": true, "fetch_status": true, "template": "{{ .UpstreamIcon }}{{ .HEAD }}{{ .BranchStatus }}" } } ] }, { "type": "prompt", "alignment": "right", "segments": [ { "type": "executiontime", "style": "powerline", "powerline_symbol": "\uE0B2", "invert_powerline": true, "foreground": "#ffffff", "background": "#83769c", "properties": { "always_enabled": true } }, { "type": "root", "style": "powerline", "powerline_symbol": "\uE0B2", "invert_powerline": true, "foreground": "#FFD700", "background": "#86BBD8", "properties": { "postfix": "", "root_icon": "⚡" } }, { "type": "session", "style": "powerline", "powerline_symbol": "\uE0B2", "invert_powerline": true, "foreground": "#ffffff", "background": "#86BBD8", "properties": { "template": "{{ .UserName }}" } }, { "type": "shell", "style": "diamond", "trailing_diamond": "\uE0B4", "invert_powerline": true, "foreground": "#ffffff", "background": "#33658A" } ] }, { "type": "prompt", "alignment": "left", "newline": true, "segments": [ { "type": "root", "style": "plain", "properties": {} }, { "type": "text", "style": "plain", "foreground": "#ffffff", "properties": { "prefix": "", "postfix": "", "text": "<#69FF94>\u276F</>" } } ] } ] }

What OS are you seeing the problem on?

Windows

Which shell are you using?

other (please specify)

Log output

Output from GitBash:
  D:/www/animatec-ng/animatec-crm-client   14.18.0   master ≡                                                              0ms  Kuba  bash 
❯ oh-my-posh --debug --shell uni --config="$POSH_THEME"

Version: 6.29.1

Segments:

ConsoleTitle(true)   -   0 ms -
os(true)             -   0 ms - 
path(true)           -   0 ms -  D:        animatec-crm-client
node(true)           - 204 ms -   14.18.0 
git(true)            -  48 ms -   master ≡ 
executiontime(true)  -   0 ms -  0ms 
root(false)          -   0 ms -
session(true)        -   0 ms -  Kuba 
shell(true)          -   0 ms -  uni 
root(false)          -   0 ms -
text(true)           -   0 ms - ❯

Run duration: 254.5474ms

Logs:

2021/12/15 21:16:54 debug: getenv
C:\Users\Kuba\AppData\Local
2021/12/15 21:16:54 getenv duration: 0s, args: LOCALAPPDATA
2021/12/15 21:16:54 getCachePath duration: 0s, args:
2021/12/15 21:16:54 getArgs duration: 0s, args:
2021/12/15 21:16:54 getArgs duration: 0s, args:
2021/12/15 21:16:54 getShellName duration: 0s, args:
2021/12/15 21:16:54 debug: getenv

2021/12/15 21:16:54 getenv duration: 0s, args: OMP_CACHE_DISABLED
2021/12/15 21:16:54 isRunningAsRoot duration: 0s, args:
2021/12/15 21:16:54 getcwd duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getShellName duration: 0s, args:
2021/12/15 21:16:54 getCurrentUser duration: 0s, args:
2021/12/15 21:16:54 getHostName duration: 0s, args:
2021/12/15 21:16:54 getcwd duration: 0s, args:
2021/12/15 21:16:54 getRuntimeGOOS duration: 0s, args:
2021/12/15 21:16:54 getcwd duration: 0s, args:
2021/12/15 21:16:54 getcwd duration: 0s, args:
2021/12/15 21:16:54 getArgs duration: 0s, args:
2021/12/15 21:16:54 getcwd duration: 0s, args:
2021/12/15 21:16:54 getRuntimeGOOS duration: 0s, args:
2021/12/15 21:16:54 getRuntimeGOOS duration: 0s, args:
2021/12/15 21:16:54 getArgs duration: 0s, args:
2021/12/15 21:16:54 getcwd duration: 0s, args:
2021/12/15 21:16:54 getRuntimeGOOS duration: 0s, args:
2021/12/15 21:16:54 getRuntimeGOOS duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getRuntimeGOOS duration: 0s, args:
2021/12/15 21:16:54 isWsl duration: 0s, args:
2021/12/15 21:16:54 getcwd duration: 0s, args:
2021/12/15 21:16:54 getcwd duration: 0s, args:
2021/12/15 21:16:54 getcwd duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 hasFiles duration: 0s, args: *.js
2021/12/15 21:16:54 hasCommand duration: 11.3657ms, args: node
2021/12/15 21:16:54 debug: runCommand
v14.18.0
2021/12/15 21:16:54 runCommand duration: 193.3013ms, args: node --version
2021/12/15 21:16:54 getcwd duration: 0s, args:
2021/12/15 21:16:54 getRuntimeGOOS duration: 0s, args:
2021/12/15 21:16:54 hasCommand duration: 18.0439ms, args: git.exe
2021/12/15 21:16:54 getcwd duration: 0s, args:
2021/12/15 21:16:54 hasParentFilePath duration: 0s, args: .git
2021/12/15 21:16:54 debug: runCommand
# branch.oid c5e0ee7e1e5c25a909363715ac306285d724e2f5
# branch.head master
# branch.upstream origin/master
# branch.ab +0 -0
1 .M N... 100644 100644 100644 b2e48b904ffa878e9bc1901b84684e15bb602502 b2e48b904ffa878e9bc1901b84684e15bb602502 src/app/shared/components/crud-table/crud-table-column.ts
? src/app/shared/interfaces/
2021/12/15 21:16:54 runCommand duration: 30.2941ms, args: git.exe -C  --no-optional-locks -c core.quotepath=false -c color.status=false status -unormal --branch --porcelain=2
2021/12/15 21:16:54 hasFolder duration: 0s, args: D:\www\animatec-ng\animatec-crm-client\.git/rebase-merge
2021/12/15 21:16:54 hasFolder duration: 0s, args: D:\www\animatec-ng\animatec-crm-client\.git/rebase-apply
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 hasFilesInDir duration: 0s, args: MERGE_MSG
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 hasFilesInDir duration: 0s, args: CHERRY_PICK_HEAD
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 hasFilesInDir duration: 0s, args: REVERT_HEAD
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 hasFilesInDir duration: 0s, args: sequencer/todo
2021/12/15 21:16:54 getcwd duration: 0s, args:
2021/12/15 21:16:54 executionTime duration: 0s, args:
2021/12/15 21:16:54 getcwd duration: 0s, args:
2021/12/15 21:16:54 isRunningAsRoot duration: 0s, args:
2021/12/15 21:16:54 getcwd duration: 0s, args:
2021/12/15 21:16:54 debug: getenv

2021/12/15 21:16:54 getenv duration: 0s, args: SSH_CONNECTION
2021/12/15 21:16:54 debug: getenv

2021/12/15 21:16:54 getenv duration: 0s, args: SSH_CLIENT
2021/12/15 21:16:54 getCurrentUser duration: 0s, args:
2021/12/15 21:16:54 getRuntimeGOOS duration: 0s, args:
2021/12/15 21:16:54 getHostName duration: 0s, args:
2021/12/15 21:16:54 isRunningAsRoot duration: 0s, args:
2021/12/15 21:16:54 getcwd duration: 0s, args:
2021/12/15 21:16:54 getShellName duration: 0s, args:
2021/12/15 21:16:54 getcwd duration: 0s, args:
2021/12/15 21:16:54 isRunningAsRoot duration: 0s, args:
2021/12/15 21:16:54 getcwd duration: 0s, args:
2021/12/15 21:16:54 isRunningAsRoot duration: 0s, args:
2021/12/15 21:16:54 getcwd duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getPathSeperator duration: 0s, args:
2021/12/15 21:16:54 getShellName duration: 0s, args:
2021/12/15 21:16:54 getCurrentUser duration: 0s, args:
2021/12/15 21:16:54 getHostName duration: 0s, args:

Output from powershell:
 D:        animatec-crm-client   14.18.0   master ≡                                               0ms  Kuba  pwsh 
> oh-my-posh --debug --shell uni --config="$POSH_THEME"

Version: 6.34.1

Segments:

ConsoleTitle(true) -   0 ms -
session(true)  -   0 ms -  Kuba@navrc 
path(true)     -   0 ms -   animatec-crm-client 
git(true)      -  18 ms -  master 
battery(false) -   0 ms -
node(true)     -   0 ms -   
shell(true)    -   0 ms -  ﲵ uni 
root(false)    -   0 ms -
text(true)     -   0 ms -  NO CONFIG 
exit(true)     -   0 ms -   

Run duration: 21.5523ms

Logs:

2021/12/15 21:16:27 debug: getenv
C:\Users\Kuba\AppData\Local
2021/12/15 21:16:27 getenv duration: 0s, args: LOCALAPPDATA
2021/12/15 21:16:27 getCachePath duration: 0s, args:
2021/12/15 21:16:27 getArgs duration: 0s, args:
2021/12/15 21:16:27 getArgs duration: 0s, args:
2021/12/15 21:16:27 getShellName duration: 0s, args:
2021/12/15 21:16:27 debug: getenv

2021/12/15 21:16:27 getenv duration: 0s, args: OMP_CACHE_DISABLED
2021/12/15 21:16:27 isRunningAsRoot duration: 505.8µs, args:
2021/12/15 21:16:27 getcwd duration: 15.3µs, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getShellName duration: 0s, args:
2021/12/15 21:16:27 getCurrentUser duration: 0s, args:
2021/12/15 21:16:27 getHostName duration: 0s, args:
2021/12/15 21:16:27 getcwd duration: 0s, args:
2021/12/15 21:16:27 debug: getenv

2021/12/15 21:16:27 getenv duration: 0s, args: SSH_CONNECTION
2021/12/15 21:16:27 debug: getenv

2021/12/15 21:16:27 getenv duration: 0s, args: SSH_CLIENT
2021/12/15 21:16:27 getCurrentUser duration: 0s, args:
2021/12/15 21:16:27 getRuntimeGOOS duration: 0s, args:
2021/12/15 21:16:27 getHostName duration: 0s, args:
2021/12/15 21:16:27 debug: getenv

2021/12/15 21:16:27 getenv duration: 0s, args: POSH_SESSION_DEFAULT_USER
2021/12/15 21:16:27 getcwd duration: 0s, args:
2021/12/15 21:16:27 getcwd duration: 0s, args:
2021/12/15 21:16:27 getArgs duration: 0s, args:
2021/12/15 21:16:27 getcwd duration: 0s, args:
2021/12/15 21:16:27 getRuntimeGOOS duration: 0s, args:
2021/12/15 21:16:27 getRuntimeGOOS duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getRuntimeGOOS duration: 0s, args:
2021/12/15 21:16:27 getcwd duration: 0s, args:
2021/12/15 21:16:27 getRuntimeGOOS duration: 0s, args:
2021/12/15 21:16:27 hasCommand duration: 17.5207ms, args: git.exe
2021/12/15 21:16:27 getcwd duration: 0s, args:
2021/12/15 21:16:27 hasParentFilePath duration: 0s, args: .git
2021/12/15 21:16:27 getFileContent duration: 1.0021ms, args: D:\www\animatec-ng\animatec-crm-client\.git/HEAD
2021/12/15 21:16:27 error: getFileContent
open D:\www\animatec-ng\animatec-crm-client\.git/logs/refs/stash: Systém nemůže nalézt uvedený soubor.
2021/12/15 21:16:27 getFileContent duration: 515.1µs, args: D:\www\animatec-ng\animatec-crm-client\.git/logs/refs/stash
2021/12/15 21:16:27 getcwd duration: 0s, args:
2021/12/15 21:16:27 getBatteryInfo duration: 992.8µs, args:
2021/12/15 21:16:27 getcwd duration: 0s, args:
2021/12/15 21:16:27 getcwd duration: 0s, args:
2021/12/15 21:16:27 getcwd duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 hasFiles duration: 0s, args: *.js
2021/12/15 21:16:27 getcwd duration: 0s, args:
2021/12/15 21:16:27 getShellName duration: 0s, args:
2021/12/15 21:16:27 getcwd duration: 0s, args:
2021/12/15 21:16:27 isRunningAsRoot duration: 0s, args:
2021/12/15 21:16:27 getcwd duration: 0s, args:
2021/12/15 21:16:27 isRunningAsRoot duration: 0s, args:
2021/12/15 21:16:27 getcwd duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getPathSeperator duration: 0s, args:
2021/12/15 21:16:27 getShellName duration: 0s, args:
2021/12/15 21:16:27 getCurrentUser duration: 0s, args:
2021/12/15 21:16:27 getHostName duration: 0s, args:
2021/12/15 21:16:27 getcwd duration: 0s, args:
2021/12/15 21:16:27 lastErrorCode duration: 0s, args:
lnu commented 2 years ago

same as https://github.com/JanDeDobbeleer/oh-my-posh/issues/1415 This has been fixed starting from v6.33.1

jakubnavratil commented 2 years ago

Tested and seems to be fixed. Thanks! 😄

jakubnavratil commented 2 years ago

Ok change from v6.33.0 to v6.33.1 unfortunatelly causes others bugs:

before update: image

after update: image

if directory DOES NOT start with letter "a": (node segment still missing) image

jakubnavratil commented 2 years ago

Ok that node segment seems to be affected by casing of the last path segment: image image

lnu commented 2 years ago

can you show the result of the debug command?

jakubnavratil commented 2 years ago
❯ brista"oh-my-posh --debug --shell uni --config="$POSH_THEME"

Version: 6.33.1

Segments:

ConsoleTitle(true)   -   0 ms -
os(true)             -   0 ms - 
path(true)           -   0 ms -  D:        abrista
node(false)          -   0 ms -
git(false)           -  18 ms -
executiontime(true)  -   0 ms -  0ms 
root(false)          -   0 ms -
session(true)        -   3 ms -  Kuba 
shell(true)          -   0 ms -  uni 
root(false)          -   0 ms -
text(true)           -   0 ms - ❯

Run duration: 21.5896ms

Logs:

2021/12/16 15:00:36 debug: getenv
C:\Users\Kuba\AppData\Local
2021/12/16 15:00:36 getenv duration: 518µs, args: LOCALAPPDATA
2021/12/16 15:00:36 getCachePath duration: 1.033ms, args:
2021/12/16 15:00:36 getArgs duration: 0s, args:
2021/12/16 15:00:36 getArgs duration: 0s, args:
2021/12/16 15:00:36 getShellName duration: 0s, args:
2021/12/16 15:00:36 debug: getenv

2021/12/16 15:00:36 getenv duration: 0s, args: OMP_CACHE_DISABLED
2021/12/16 15:00:36 isRunningAsRoot duration: 0s, args:
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getShellName duration: 0s, args:
2021/12/16 15:00:36 getCurrentUser duration: 0s, args:
2021/12/16 15:00:36 getHostName duration: 0s, args:
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 getRuntimeGOOS duration: 0s, args:
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 getArgs duration: 0s, args:
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 getRuntimeGOOS duration: 0s, args:
2021/12/16 15:00:36 getRuntimeGOOS duration: 0s, args:
2021/12/16 15:00:36 getArgs duration: 0s, args:
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 getRuntimeGOOS duration: 0s, args:
2021/12/16 15:00:36 getRuntimeGOOS duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getRuntimeGOOS duration: 0s, args:
2021/12/16 15:00:36 isWsl duration: 0s, args:
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 hasFiles duration: 0s, args: *.js
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 hasFiles duration: 0s, args: *.ts
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 hasFiles duration: 0s, args: package.json
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 hasFiles duration: 0s, args: .nvmrc
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 hasFiles duration: 0s, args: pnpm-workspace.yaml
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 hasFiles duration: 0s, args: .pnpmfile.cjs
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 hasFiles duration: 0s, args: .npmrc
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 getRuntimeGOOS duration: 0s, args:
2021/12/16 15:00:36 hasCommand duration: 17.5077ms, args: git.exe
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 error: hasParentFilePath
CreateFile D:\.git: Systém nemůže nalézt uvedený soubor.
2021/12/16 15:00:36 hasParentFilePath duration: 514.8µs, args: .git
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 executionTime duration: 0s, args:
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 isRunningAsRoot duration: 0s, args:
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 debug: getenv

2021/12/16 15:00:36 getenv duration: 0s, args: SSH_CONNECTION
2021/12/16 15:00:36 debug: getenv

2021/12/16 15:00:36 getenv duration: 0s, args: SSH_CLIENT
2021/12/16 15:00:36 getCurrentUser duration: 0s, args:
2021/12/16 15:00:36 getRuntimeGOOS duration: 0s, args:
2021/12/16 15:00:36 getHostName duration: 0s, args:
2021/12/16 15:00:36 isRunningAsRoot duration: 0s, args:
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 getShellName duration: 0s, args:
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 isRunningAsRoot duration: 0s, args:
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 isRunningAsRoot duration: 0s, args:
2021/12/16 15:00:36 getcwd duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getPathSeperator duration: 0s, args:
2021/12/16 15:00:36 getShellName duration: 0s, args:
2021/12/16 15:00:36 getCurrentUser duration: 0s, args:
2021/12/16 15:00:36 getHostName duration: 0s, args:
jakubnavratil commented 2 years ago

Ok, that error with partial folder name is fixed, when osc99: false Dunno why I was using true, I guess it was in theme I used.

But why isn't node segment showing when folder starts with capital name? image

Log from folder with capital Letter (node not showing):

oh-my-posh --debug --shell uni --config="$POSH_THEME"

Version: 6.33.1

Segments:

ConsoleTitle(true)   -   0 ms -
os(true)             -   0 ms - 
path(true)           -   0 ms -  
node(false)          -   0 ms -
git(false)           -  17 ms -
executiontime(true)  -   0 ms -  0ms 
root(false)          -   0 ms -
session(true)        -   0 ms -  Kuba 
shell(true)          -   0 ms -  uni 
root(false)          -   0 ms -
text(true)           -   0 ms - ❯

Run duration: 18.9651ms

Logs:

2021/12/16 15:16:43 debug: getenv
C:\Users\Kuba\AppData\Local
2021/12/16 15:16:43 getenv duration: 0s, args: LOCALAPPDATA
2021/12/16 15:16:43 getCachePath duration: 0s, args:
2021/12/16 15:16:43 getArgs duration: 0s, args:
2021/12/16 15:16:43 getArgs duration: 0s, args:
2021/12/16 15:16:43 getShellName duration: 0s, args:
2021/12/16 15:16:43 debug: getenv

2021/12/16 15:16:43 getenv duration: 0s, args: OMP_CACHE_DISABLED
2021/12/16 15:16:43 isRunningAsRoot duration: 0s, args:
2021/12/16 15:16:43 getcwd duration: 0s, args:
2021/12/16 15:16:43 getPathSeperator duration: 0s, args:
2021/12/16 15:16:43 getPathSeperator duration: 0s, args:
2021/12/16 15:16:43 getShellName duration: 0s, args:
2021/12/16 15:16:43 getCurrentUser duration: 0s, args:
2021/12/16 15:16:43 getHostName duration: 0s, args:
2021/12/16 15:16:43 getcwd duration: 0s, args:
2021/12/16 15:16:43 getRuntimeGOOS duration: 0s, args:
2021/12/16 15:16:43 getcwd duration: 0s, args:
2021/12/16 15:16:43 getcwd duration: 0s, args:
2021/12/16 15:16:43 getArgs duration: 0s, args:
2021/12/16 15:16:43 getcwd duration: 0s, args:
2021/12/16 15:16:43 getRuntimeGOOS duration: 0s, args:
2021/12/16 15:16:43 getRuntimeGOOS duration: 0s, args:
2021/12/16 15:16:43 getArgs duration: 0s, args:
2021/12/16 15:16:43 getcwd duration: 0s, args:
2021/12/16 15:16:43 getRuntimeGOOS duration: 0s, args:
2021/12/16 15:16:43 getRuntimeGOOS duration: 0s, args:
2021/12/16 15:16:43 getPathSeperator duration: 0s, args:
2021/12/16 15:16:43 getPathSeperator duration: 0s, args:
2021/12/16 15:16:43 getPathSeperator duration: 0s, args:
2021/12/16 15:16:43 getPathSeperator duration: 0s, args:
2021/12/16 15:16:43 getRuntimeGOOS duration: 0s, args:
2021/12/16 15:16:43 isWsl duration: 0s, args:
2021/12/16 15:16:43 getcwd duration: 0s, args:
2021/12/16 15:16:43 getcwd duration: 0s, args:
2021/12/16 15:16:43 getcwd duration: 0s, args:
2021/12/16 15:16:43 getRuntimeGOOS duration: 0s, args:
2021/12/16 15:16:43 hasCommand duration: 17.4512ms, args: git.exe
2021/12/16 15:16:43 getcwd duration: 0s, args:
2021/12/16 15:16:43 error: hasParentFilePath
CreateFile C:\.git: Systém nemůže nalézt uvedený soubor.
2021/12/16 15:16:43 hasParentFilePath duration: 0s, args: .git
2021/12/16 15:16:43 getcwd duration: 0s, args:
2021/12/16 15:16:43 executionTime duration: 0s, args:
2021/12/16 15:16:43 getcwd duration: 0s, args:
2021/12/16 15:16:43 isRunningAsRoot duration: 0s, args:
2021/12/16 15:16:43 getcwd duration: 0s, args:
2021/12/16 15:16:43 debug: getenv

2021/12/16 15:16:43 getenv duration: 0s, args: SSH_CONNECTION
2021/12/16 15:16:43 debug: getenv

2021/12/16 15:16:43 getenv duration: 0s, args: SSH_CLIENT
2021/12/16 15:16:43 getCurrentUser duration: 0s, args:
2021/12/16 15:16:43 getRuntimeGOOS duration: 0s, args:
2021/12/16 15:16:43 getHostName duration: 0s, args:
2021/12/16 15:16:43 isRunningAsRoot duration: 0s, args:
2021/12/16 15:16:43 getcwd duration: 0s, args:
2021/12/16 15:16:43 getShellName duration: 0s, args:
2021/12/16 15:16:43 getcwd duration: 0s, args:
2021/12/16 15:16:43 isRunningAsRoot duration: 0s, args:
2021/12/16 15:16:43 getcwd duration: 0s, args:
2021/12/16 15:16:43 isRunningAsRoot duration: 0s, args:
2021/12/16 15:16:43 getcwd duration: 0s, args:
2021/12/16 15:16:43 getPathSeperator duration: 0s, args:
2021/12/16 15:16:43 getPathSeperator duration: 0s, args:
2021/12/16 15:16:43 getShellName duration: 0s, args:
2021/12/16 15:16:43 getCurrentUser duration: 0s, args:
2021/12/16 15:16:43 getHostName duration: 0s, args:
lnu commented 2 years ago

if you call --print-init --shell bash, do you get this: image

jakubnavratil commented 2 years ago

Yes, I got this version (6.33.1)

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