oh-my-posh: home_enabled not working for node in ZSH
Code of Conduct
- I agree to follow this project’s Code of Conduct
What happened?
First off, I should probably say that this shell is not really normal. I’m running Git Bash with zsh (and oh-my-zsh) installed, with oh-my-posh to use the same prompt across shells and WSL with the same config file.
Setting home_enabled to false in my configuration is not removing my node version from my prompt when in my home directory. This same config works fine on PowerShell however (did not test on cmd).

The node section of my config looks like this:
{
"type": "node",
"style": "plain",
"foreground": "#6FBC4F",
"properties": {
"prefix": " ",
"home_enabled": "false",
"display_mode": "files",
"enable_version_mismatch": true,
"fetch_package_manager": true
}
}
Theme
You can see my full config here: https://gist.github.com/dheerajpv/a8c471021e975c59f906b936b9063438
What OS are you seeing the problem on?
Windows
Which shell are you using?
zsh
Log output
[1mVersion:[0m 7.0.0
[1mSegments:[0m
ConsoleTitle(true) - 0 ms -
session(true) - 0 ms - [38;2;69;241;194m∩öê [0m[38;2;69;241;194mdheer[0m[38;2;69;241;194m on[0m
os(true) - 0 ms - [38;2;69;241;194m [0m[38;2;69;241;194m[0m[38;2;69;241;194m [0m
path(true) - 0 ms - [38;2;12;160;216m [0m[38;2;12;160;216m]8;;file://C:\Users\dheer\~]8;;\[0m[38;2;12;160;216m [0m
git(false) - 0 ms -
node(false) - 0 ms -
python(false) - 0 ms -
dotnet(false) - 0 ms -
executiontime(false) - 0 ms -
time(true) - 0 ms - [38;2;216;39;77m [0m[38;2;216;39;77m14:01:54[0m[38;2;216;39;77m [0m
exit(true) - 0 ms - [38;2;66;205;73m#[0m[38;2;66;205;73m [0m
[1mRun duration:[0m 1.0415ms
[1mCache path:[0m C:\Users\dheer\AppData\Local/oh-my-posh
[1mLogs:[0m
2022/01/18 14:01:54 debug: getenv
C:\Users\dheer\AppData\Local
2022/01/18 14:01:54 getenv duration: 0s, args: LOCALAPPDATA
2022/01/18 14:01:54 getCachePath duration: 0s, args:
2022/01/18 14:01:54 getArgs duration: 0s, args:
2022/01/18 14:01:54 getArgs duration: 0s, args:
2022/01/18 14:01:54 getShellName duration: 515.3┬╡s, args:
2022/01/18 14:01:54 debug: getenv
2022/01/18 14:01:54 getenv duration: 0s, args: OMP_CACHE_DISABLED
2022/01/18 14:01:54 isRunningAsRoot duration: 0s, args:
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 getPathSeperator duration: 0s, args:
2022/01/18 14:01:54 getPathSeperator duration: 0s, args:
2022/01/18 14:01:54 getShellName duration: 0s, args:
2022/01/18 14:01:54 getCurrentUser duration: 0s, args:
2022/01/18 14:01:54 getHostName duration: 0s, args:
2022/01/18 14:01:54 lastErrorCode duration: 0s, args:
2022/01/18 14:01:54 environ duration: 0s, args:
2022/01/18 14:01:54 getRuntimeGOOS duration: 0s, args:
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 debug: getenv
2022/01/18 14:01:54 getenv duration: 0s, args: SSH_CONNECTION
2022/01/18 14:01:54 debug: getenv
2022/01/18 14:01:54 getenv duration: 0s, args: SSH_CLIENT
2022/01/18 14:01:54 getCurrentUser duration: 0s, args:
2022/01/18 14:01:54 getRuntimeGOOS duration: 0s, args:
2022/01/18 14:01:54 debug: getenv
2022/01/18 14:01:54 getenv duration: 0s, args: POSH_SESSION_DEFAULT_USER
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 getRuntimeGOOS duration: 0s, args:
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 getArgs duration: 0s, args:
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 getRuntimeGOOS duration: 0s, args:
2022/01/18 14:01:54 getRuntimeGOOS duration: 0s, args:
2022/01/18 14:01:54 getPathSeperator duration: 0s, args:
2022/01/18 14:01:54 getArgs duration: 0s, args:
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 getRuntimeGOOS duration: 0s, args:
2022/01/18 14:01:54 getRuntimeGOOS duration: 0s, args:
2022/01/18 14:01:54 getPathSeperator duration: 0s, args:
2022/01/18 14:01:54 getRuntimeGOOS duration: 0s, args:
2022/01/18 14:01:54 isWsl duration: 0s, args:
2022/01/18 14:01:54 stackCount duration: 0s, args:
2022/01/18 14:01:54 isRunningAsRoot duration: 0s, args:
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 getPathSeperator duration: 0s, args:
2022/01/18 14:01:54 getPathSeperator duration: 0s, args:
2022/01/18 14:01:54 getShellName duration: 0s, args:
2022/01/18 14:01:54 getCurrentUser duration: 0s, args:
2022/01/18 14:01:54 getHostName duration: 0s, args:
2022/01/18 14:01:54 lastErrorCode duration: 0s, args:
2022/01/18 14:01:54 environ duration: 0s, args:
2022/01/18 14:01:54 getRuntimeGOOS duration: 0s, args:
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 getRuntimeGOOS duration: 0s, args:
2022/01/18 14:01:54 hasCommand duration: 525.2┬╡s, args: git.exe
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 error: hasParentFilePath
CreateFile C:\.git: The system cannot find the file specified.
2022/01/18 14:01:54 hasParentFilePath duration: 0s, args: .git
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 debug: getenv
2022/01/18 14:01:54 getenv duration: 0s, args: VIRTUAL_ENV
2022/01/18 14:01:54 debug: getenv
2022/01/18 14:01:54 getenv duration: 0s, args: CONDA_ENV_PATH
2022/01/18 14:01:54 debug: getenv
2022/01/18 14:01:54 getenv duration: 0s, args: CONDA_DEFAULT_ENV
2022/01/18 14:01:54 debug: getenv
2022/01/18 14:01:54 getenv duration: 0s, args: PYENV_VERSION
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 executionTime duration: 0s, args:
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 getcwd duration: 0s, args:
2022/01/18 14:01:54 lastErrorCode duration: 0s, args:
2022/01/18 14:01:54 debug: getenv
C:\Users\dheer\AppData\Local
2022/01/18 14:01:54 getenv duration: 0s, args: LOCALAPPDATA
2022/01/18 14:01:54 getCachePath duration: 0s, args:
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 19 (11 by maintainers)
Commits related to this issue
- feat: log directories on debug relates to #1605 — committed to JanDeDobbeleer/oh-my-posh by JanDeDobbeleer 2 years ago
- feat: log directories on debug relates to #1605 — committed to JanDeDobbeleer/oh-my-posh by JanDeDobbeleer 2 years ago
- fix(zsh): do not provide PWD resolves #1605 — committed to JanDeDobbeleer/oh-my-posh by JanDeDobbeleer 2 years ago
- fix(zsh): do not provide PWD resolves #1605 — committed to JanDeDobbeleer/oh-my-posh by JanDeDobbeleer 2 years ago
works now, thanks!
Yes, I’m using the same config for both cases:
Also, it works as intended in powershell so it shouldn’t be a configuration issue.