JanDeDobbeleer / oh-my-posh

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

changes doesn't appear on wsl2 #1381

Closed Fighteros closed 2 years ago

Fighteros commented 2 years ago

Code of Conduct

What happened?

Hi, I've installed oh-my-posh on my windows 11 machine and installed it for Powershell and Kali-linux WSL instance. However, the Kali instance does not show working changes whereas the powershell does. Both use the same theme. nothing works unless i type the command in the pic how to fix this ? image

Theme

{ "final_space": true, "console_title": true, "console_title_style": "template", "console_title_template": "{{ .Shell }} in {{ .Folder }}", "blocks": [ { "type": "prompt", "alignment": "left", "horizontal_offset": 0, "vertical_offset": 0, "segments": [ { "type": "path", "style": "diamond", "powerline_symbol": "", "invert_powerline": false, "foreground": "#ffffff", "background": "#ff479c", "leading_diamond": "", "trailing_diamond": "", "properties": { "prefix": "  ", "style": "folder" } }, { "type": "git", "style": "powerline", "powerline_symbol": "", "invert_powerline": false, "foreground": "#193549", "background": "#fffb38", "leading_diamond": "", "trailing_diamond": "", "properties": { "display_status": true, "display_stash_count": true, "display_upstream_icon": true } }, { "type": "root", "style": "powerline", "powerline_symbol": "", "invert_powerline": false, "foreground": "#ffffff", "background": "#ffff66", "leading_diamond": "", "trailing_diamond": "", "properties": null }, { "type": "exit", "style": "powerline", "powerline_symbol": "", "invert_powerline": false, "foreground": "#ffffff", "background": "#2e9599", "leading_diamond": "", "trailing_diamond": "", "properties": { "always_enabled": true, "color_background": true, "display_exit_code": false, "error_color": "#f1184c", "prefix": " " } } ] } ] }

What OS are you seeing the problem on?

Windows

Which shell are you using?

bash

Log output

Version: 6.27.0

Segments:

ConsoleTitle(true) -   0 ms - uni in alg-ds
path(true)  -   0 ms -   alg-ds 
git(true)   -   1 ms -  cpp ≢ +2 
root(false) -   0 ms -
exit(true)  -   0 ms -   

Run duration: 1.677628ms

Logs:

2021/12/05 21:46:38 debug: getenv

2021/12/05 21:46:38 getenv duration: 63.412µs, args: XDG_CACHE_HOME
2021/12/05 21:46:38 getCachePath duration: 85.945µs, args:
2021/12/05 21:46:38 getArgs duration: 50ns, args:
2021/12/05 21:46:38 getArgs duration: 30ns, args:
2021/12/05 21:46:38 getShellName duration: 130ns, args:
2021/12/05 21:46:38 debug: getenv

2021/12/05 21:46:38 getenv duration: 1.453µs, args: OMP_CACHE_DISABLED
2021/12/05 21:46:38 isRunningAsRoot duration: 511ns, args:
2021/12/05 21:46:38 getcwd duration: 14.788µs, args:
2021/12/05 21:46:38 getPathSeperator duration: 50ns, args:
2021/12/05 21:46:38 getPathSeperator duration: 30ns, args:
2021/12/05 21:46:38 getPathSeperator duration: 30ns, args:
2021/12/05 21:46:38 getPathSeperator duration: 30ns, args:
2021/12/05 21:46:38 getPathSeperator duration: 30ns, args:
2021/12/05 21:46:38 getPathSeperator duration: 30ns, args:
2021/12/05 21:46:38 getPathSeperator duration: 30ns, args:
2021/12/05 21:46:38 getPathSeperator duration: 30ns, args:
2021/12/05 21:46:38 getShellName duration: 40ns, args:
2021/12/05 21:46:38 getCurrentUser duration: 190ns, args:
2021/12/05 21:46:38 getHostName duration: 1.153µs, args:
2021/12/05 21:46:38 getcwd duration: 101ns, args:
2021/12/05 21:46:38 getcwd duration: 30ns, args:
2021/12/05 21:46:38 getArgs duration: 40ns, args:
2021/12/05 21:46:38 getcwd duration: 30ns, args:
2021/12/05 21:46:38 getRuntimeGOOS duration: 40ns, args:
2021/12/05 21:46:38 getRuntimeGOOS duration: 30ns, args:
2021/12/05 21:46:38 getPathSeperator duration: 40ns, args:
2021/12/05 21:46:38 getPathSeperator duration: 30ns, args:
2021/12/05 21:46:38 getPathSeperator duration: 30ns, args:
2021/12/05 21:46:38 getPathSeperator duration: 20ns, args:
2021/12/05 21:46:38 getPathSeperator duration: 30ns, args:
2021/12/05 21:46:38 getPathSeperator duration: 30ns, args:
2021/12/05 21:46:38 getPathSeperator duration: 30ns, args:
2021/12/05 21:46:38 getPathSeperator duration: 30ns, args:
2021/12/05 21:46:38 getPathSeperator duration: 30ns, args:
2021/12/05 21:46:38 getRuntimeGOOS duration: 20ns, args:
2021/12/05 21:46:38 getcwd duration: 60ns, args:
2021/12/05 21:46:38 getRuntimeGOOS duration: 30ns, args:
2021/12/05 21:46:38 debug: getenv
kali-linux
2021/12/05 21:46:38 getenv duration: 1.153µs, args: WSL_DISTRO_NAME
2021/12/05 21:46:38 isWsl duration: 3.096µs, args:
2021/12/05 21:46:38 getcwd duration: 30ns, args:
2021/12/05 21:46:38 hasCommand duration: 12.183µs, args: git
2021/12/05 21:46:38 getcwd duration: 30ns, args:
2021/12/05 21:46:38 hasParentFilePath duration: 2.935µs, args: .git
2021/12/05 21:46:38 getRuntimeGOOS duration: 30ns, args:
2021/12/05 21:46:38 debug: runCommand
## No commits yet on cpp
?? .vscode/
?? stack.cpp
2021/12/05 21:46:38 runCommand duration: 1.177872ms, args: git -C  --no-optional-locks -c core.quotepath=false -c color.status=false status -unormal --short --branch
2021/12/05 21:46:38 getFileContent duration: 14.327µs, args: /home/fighteros/cpp/alg-ds/.git/HEAD
2021/12/05 21:46:38 hasFolder duration: 2.114µs, args: /home/fighteros/cpp/alg-ds/.git/rebase-merge
2021/12/05 21:46:38 hasFolder duration: 941ns, args: /home/fighteros/cpp/alg-ds/.git/rebase-apply
2021/12/05 21:46:38 getPathSeperator duration: 70ns, args:
2021/12/05 21:46:38 hasFilesInDir duration: 3.898µs, args: MERGE_MSG
2021/12/05 21:46:38 getPathSeperator duration: 30ns, args:
2021/12/05 21:46:38 hasFilesInDir duration: 2.395µs, args: CHERRY_PICK_HEAD
2021/12/05 21:46:38 getPathSeperator duration: 30ns, args:
2021/12/05 21:46:38 hasFilesInDir duration: 2.094µs, args: REVERT_HEAD
2021/12/05 21:46:38 getPathSeperator duration: 30ns, args:
2021/12/05 21:46:38 hasFilesInDir duration: 2.124µs, args: sequencer/todo
2021/12/05 21:46:38 error: getFileContent
open /home/fighteros/cpp/alg-ds/.git/logs/refs/stash: no such file or directory
2021/12/05 21:46:38 getFileContent duration: 2.966µs, args: /home/fighteros/cpp/alg-ds/.git/logs/refs/stash
2021/12/05 21:46:38 getcwd duration: 130ns, args:
2021/12/05 21:46:38 isRunningAsRoot duration: 311ns, args:
2021/12/05 21:46:38 getcwd duration: 30ns, args:
2021/12/05 21:46:38 lastErrorCode duration: 210ns, args:
JanDeDobbeleer commented 2 years ago

@Fighteros the only thing I can think of? They're not using the same config in reality. As you clearly see oh-my-posh rendering the info when you call it directly. Also, your config might best be updated to the latest advancements in the git segment.

Fighteros commented 2 years ago

i'll try to use the same config i use on windows then, how to update to latest advancements in the git segment ?

Fighteros commented 2 years ago

@JanDeDobbeleer i tried to use the same config still the same probem image

log

Version: 6.27.0

Segments:

ConsoleTitle(true) -   0 ms - uni in cpp
path(true)  -   0 ms -   cpp 
git(false)  -   0 ms -
root(false) -   0 ms -
exit(true)  -   0 ms -   

Run duration: 374.146µs

Logs:

2021/12/05 22:22:27 debug: getenv

2021/12/05 22:22:27 getenv duration: 5.931µs, args: XDG_CACHE_HOME
2021/12/05 22:22:27 getCachePath duration: 19.557µs, args:
2021/12/05 22:22:27 getArgs duration: 40ns, args:
2021/12/05 22:22:27 getArgs duration: 31ns, args:
2021/12/05 22:22:27 getShellName duration: 200ns, args:
2021/12/05 22:22:27 debug: getenv

2021/12/05 22:22:27 getenv duration: 1.303µs, args: OMP_CACHE_DISABLED
2021/12/05 22:22:27 isRunningAsRoot duration: 501ns, args:
2021/12/05 22:22:27 getcwd duration: 12.875µs, args:
2021/12/05 22:22:27 getPathSeperator duration: 40ns, args:
2021/12/05 22:22:27 getPathSeperator duration: 30ns, args:
2021/12/05 22:22:27 getPathSeperator duration: 30ns, args:
2021/12/05 22:22:27 getPathSeperator duration: 30ns, args:
2021/12/05 22:22:27 getPathSeperator duration: 30ns, args:
2021/12/05 22:22:27 getShellName duration: 30ns, args:
2021/12/05 22:22:27 getCurrentUser duration: 191ns, args:
2021/12/05 22:22:27 getHostName duration: 1.252µs, args:
2021/12/05 22:22:27 getcwd duration: 150ns, args:
2021/12/05 22:22:27 getcwd duration: 30ns, args:
2021/12/05 22:22:27 getArgs duration: 40ns, args:
2021/12/05 22:22:27 getcwd duration: 30ns, args:
2021/12/05 22:22:27 getRuntimeGOOS duration: 61ns, args:
2021/12/05 22:22:27 getRuntimeGOOS duration: 30ns, args:
2021/12/05 22:22:27 getPathSeperator duration: 40ns, args:
2021/12/05 22:22:27 getPathSeperator duration: 30ns, args:
2021/12/05 22:22:27 getPathSeperator duration: 30ns, args:
2021/12/05 22:22:27 getPathSeperator duration: 30ns, args:
2021/12/05 22:22:27 getPathSeperator duration: 20ns, args:
2021/12/05 22:22:27 getPathSeperator duration: 30ns, args:
2021/12/05 22:22:27 getRuntimeGOOS duration: 30ns, args:
2021/12/05 22:22:27 getcwd duration: 110ns, args:
2021/12/05 22:22:27 getRuntimeGOOS duration: 30ns, args:
2021/12/05 22:22:27 debug: getenv
kali-linux
2021/12/05 22:22:27 getenv duration: 1.302µs, args: WSL_DISTRO_NAME
2021/12/05 22:22:27 isWsl duration: 3.156µs, args:
2021/12/05 22:22:27 getcwd duration: 30ns, args:
2021/12/05 22:22:27 hasCommand duration: 9.969µs, args: git
2021/12/05 22:22:27 getcwd duration: 30ns, args:
2021/12/05 22:22:27 error: hasParentFilePath
stat /.git: no such file or directory
2021/12/05 22:22:27 hasParentFilePath duration: 7.054µs, args: .git
2021/12/05 22:22:27 getcwd duration: 30ns, args:
2021/12/05 22:22:27 isRunningAsRoot duration: 150ns, args:
2021/12/05 22:22:27 getcwd duration: 30ns, args:
2021/12/05 22:22:27 lastErrorCode duration: 50ns, args:

JanDeDobbeleer commented 2 years ago

@Fighteros what does your .bashrc file look like?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

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.