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

Error: invalid argument "" for "--no-status" flag: strconv.ParseBool: parsing "": invalid syntax #4128

Closed janegilring closed 1 year ago

janegilring commented 1 year ago

Code of Conduct

What happened?

I am using this approach where I store my profile in a GitHub Gist to have it available across machines (Windows/MacOS/Linux).

This works great except on MacOs, where I get this error when launching a new PowerShell instance and either pressing Enter or typing a command and pressing Enter:

Error: invalid argument "" for "--no-status" flag: strconv.ParseBool: parsing "": invalid syntax

After the error, the prompt is correctly changed to the one defined in the profile file.

To repro, put this in the PowerShell profile file:

function prompt {
    oh-my-posh init pwsh --config "$(brew --prefix oh-my-posh)/themes/night-owl.omp.json" | Invoke-Expression
}

If calling the command outside of the prompt function, it works without errors - but that breaks the lazy loading of the profile as seen in this Gist.

Also, note that the issue is only present on MacOS. The synchronized Gist works fine on Windows (not tested on Linux yet).

Theme

night-owl.omp.json

What OS are you seeing the problem on?

macOS

Which shell are you using?

powershell

Log output

Version: 18.2.2

Shell: pwsh (7.3.6)

Segments:

ConsoleTitle(true)                         -   0 ms - janegilring
os(true)                                   -   0 ms - ╭─ 
root(false)                                -   0 ms -
path(true)                                 -   0 ms -  
git(false)                                 -   0 ms -
executiontime(true)                        -   0 ms -  0ms
shell(true)                                -   0 ms -   pwsh
sysinfo(true)                              -   0 ms -  79.97%
angular(false)                             -   0 ms -
aws(false)                                 -   0 ms -
az(false)                                  -   0 ms -
azfunc(false)                              -   0 ms -
cds(false)                                 -   0 ms -
crystal(false)                             -   0 ms -
cf(false)                                  -   0 ms -
cftarget(false)                            -   0 ms -
cmake(false)                               -   0 ms -
dart(false)                                -   0 ms -
dotnet(false)                              -   0 ms -
flutter(false)                             -   0 ms -
go(false)                                  -   0 ms -
haskell(false)                             -   0 ms -
java(false)                                -   0 ms -
julia(false)                               -   0 ms -
kotlin(false)                              -   0 ms -
kubectl(false)                             -  24 ms -
lua(false)                                 -   0 ms -
node(false)                                -   0 ms -
nx(false)                                  -   0 ms -
perl(false)                                -   0 ms -
php(false)                                 -   0 ms -
python(false)                              -   0 ms -
r(false)                                   -   0 ms -
ruby(false)                                -   0 ms -
rust(false)                                -   0 ms -
swift(false)                               -   0 ms -
time(true)                                 -   0 ms -  13:53:35
text(true)                                 -   0 ms - ╰─
spotify(true)                              - 410 ms -   Gabriel Thomas ~ Ascension
status(true)                               -   0 ms -  

Run duration: 440.854792ms

Cache path: /Users/janegilring/.cache/oh-my-posh

Config path: /opt/homebrew/opt/oh-my-posh/themes/night-owl.omp.json

Logs:

[DEBUG] 13:53:35.020 shell.go:Getenv:387 → iTerm.app
[TRACE] 13:53:35.020 shell.go:Getenv(TERM_PROGRAM) - 577.542µs
[DEBUG] 13:53:35.020 shell.go:Getenv:387 → NO DATA
[TRACE] 13:53:35.020 shell.go:Getenv(XDG_CACHE_HOME) - 1.667µs
[TRACE] 13:53:35.020 shell_unix.go:CachePath() - 14.292µs
[DEBUG] 13:53:35.020 shell.go:Getenv:387 → /opt/homebrew/opt/oh-my-posh/themes/night-owl.omp.json
[TRACE] 13:53:35.020 shell.go:Getenv(POSH_THEME) - 3.458µs
[DEBUG] 13:53:35.020 shell_unix.go:Platform:71 → darwin
[TRACE] 13:53:35.020 shell.go:resolveConfigPath() - 10.375µs
[TRACE] 13:53:35.020 shell.go:Init() - 1.285208ms
[TRACE] 13:53:35.020 shell.go:Flags() - 0s
[TRACE] 13:53:35.021 config.go:loadConfig() - 743.667µs
[TRACE] 13:53:35.021 shell.go:Flags() - 42ns
[DEBUG] 13:53:35.021 shell.go:Getenv:387 → NO DATA
[TRACE] 13:53:35.021 shell.go:Getenv(OMP_CACHE_DISABLED) - 1.417µs
[DEBUG] 13:53:35.021 shell.go:Shell:627 → no shell name provided in flags, trying to detect it
[DEBUG] 13:53:35.021 shell.go:Shell:635 → process name: pwsh
[TRACE] 13:53:35.021 shell.go:Shell() - 248.708µs
[DEBUG] 13:53:35.021 shell.go:Getenv:387 → 7.3.6
[TRACE] 13:53:35.021 shell.go:Getenv(POSH_SHELL_VERSION) - 1.709µs
[DEBUG] 13:53:35.022 debug.go:PrintDebug:23 → Segment: Title
[TRACE] 13:53:35.022 shell_unix.go:Root() - 375ns
[TRACE] 13:53:35.022 shell.go:Shell() - 41ns
[TRACE] 13:53:35.022 shell.go:StatusCodes() - 41ns
[DEBUG] 13:53:35.022 shell_unix.go:IsWsl:35 → false
[TRACE] 13:53:35.022 shell_unix.go:IsWsl() - 41.792µs
[DEBUG] 13:53:35.022 shell.go:TemplateCache:805 → environment: [POSH_CURSOR_LINE=1 POSH_THEME=/opt/homebrew/opt/oh-my-posh/themes/night-owl.omp.json TERM_PROGRAM=iTerm.app HOMEBREW_REPOSITORY=/opt/homebrew XPC_FLAGS=0x0 HOME=/Users/janegilring __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0 __CFBundleIdentifier=com.googlecode.iterm2 POSH_SHELL_VERSION=7.3.6 OLDPWD=/Users/janegilring POSH_CURSOR_COLUMN=1 INFOPATH=/opt/homebrew/share/info POSH_AZURE_ENABLED=False PSModulePath=/Users/janegilring/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/usr/local/microsoft/powershell/7/Modules XPC_SERVICE_NAME=0 TERM_SESSION_ID=w0t20p0:B99E4821-F951-4710-8CC3-FA3D6B760184 TERM=xterm-256color COLORFGBG=7;0 COLORTERM=truecolor TERM_PROGRAM_VERSION=3.4.19 ITERM_SESSION_ID=w0t20p0:B99E4821-F951-4710-8CC3-FA3D6B760184 ITERM_PROFILE=Default SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.9qwdhrHuZO/Listeners COMMAND_MODE=unix2003 POSH_GIT_ENABLED=False POSH_PID=37369 LOGNAME=janegilring USER=janegilring POWERLINE_COMMAND=oh-my-posh SHELL=/usr/local/microsoft/powershell/7/pwsh HOMEBREW_CELLAR=/opt/homebrew/Cellar CONDA_PROMPT_MODIFIER=False TMPDIR=/var/folders/t8/xpzsbz8d6td6b4cft3z_q4wm0000gn/T/ LC_TERMINAL=iTerm2 LC_CTYPE=UTF-8 PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/microsoft/powershell/7:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin _=/usr/local/microsoft/powershell/7/pwsh HOMEBREW_PREFIX=/opt/homebrew LC_TERMINAL_VERSION=3.4.19 SHLVL=0 PWD=/Users/janegilring MANPATH=/opt/homebrew/share/man:]
[TRACE] 13:53:35.022 shell.go:GOOS() - 83ns
[DEBUG] 13:53:35.022 shell.go:Pwd:417 → /Users/janegilring
[TRACE] 13:53:35.022 shell.go:Pwd() - 14.375µs
[TRACE] 13:53:35.022 shell.go:GOOS() - 42ns
[TRACE] 13:53:35.022 shell.go:GOOS() - 0s
[TRACE] 13:53:35.022 shell.go:GOOS() - 0s
[TRACE] 13:53:35.022 shell.go:GOOS() - 0s
[TRACE] 13:53:35.022 shell.go:GOOS() - 42ns
[TRACE] 13:53:35.022 shell.go:GOOS() - 42ns
[TRACE] 13:53:35.022 shell.go:GOOS() - 0s
[TRACE] 13:53:35.022 shell.go:GOOS() - 42ns
[TRACE] 13:53:35.022 shell.go:GOOS() - 41ns
[TRACE] 13:53:35.022 shell.go:GOOS() - 0s
[TRACE] 13:53:35.022 shell.go:GOOS() - 0s
[TRACE] 13:53:35.022 shell.go:GOOS() - 0s
[TRACE] 13:53:35.022 shell.go:GOOS() - 42ns
[DEBUG] 13:53:35.022 shell.go:User:538 → janegilring
[TRACE] 13:53:35.022 shell.go:User() - 1.459µs
[DEBUG] 13:53:35.022 shell.go:Host:550 → Jans-MacBook-Air
[TRACE] 13:53:35.022 shell.go:Host() - 5.833µs
[TRACE] 13:53:35.022 shell.go:GOOS() - 0s
[DEBUG] 13:53:35.022 shell.go:Getenv:387 → 0
[TRACE] 13:53:35.022 shell.go:Getenv(SHLVL) - 1.416µs
[TRACE] 13:53:35.022 shell.go:TemplateCache() - 252.417µs
[TRACE] 13:53:35.022 shell.go:Flags() - 41ns
[DEBUG] 13:53:35.022 block.go:Debug:280 → Segment: os
[TRACE] 13:53:35.022 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.022 shell.go:GOOS() - 42ns
[TRACE] 13:53:35.022 shell.go:GOOS() - 0s
[DEBUG] 13:53:35.022 properties.go:GetString:28 → 
[TRACE] 13:53:35.022 shell.go:TemplateCache() - 84ns
[TRACE] 13:53:35.022 shell.go:TemplateCache() - 83ns
[TRACE] 13:53:35.022 shell.go:Shell() - 42ns
[DEBUG] 13:53:35.022 block.go:Debug:280 → Segment: root
[TRACE] 13:53:35.022 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.022 shell.go:GOOS() - 41ns
[TRACE] 13:53:35.022 shell_unix.go:Root() - 375ns
[DEBUG] 13:53:35.022 block.go:Debug:280 → Segment: path
[TRACE] 13:53:35.022 shell.go:Pwd() - 0s
[TRACE] 13:53:35.022 shell.go:GOOS() - 42ns
[TRACE] 13:53:35.022 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.022 shell.go:Shell() - 42ns
[TRACE] 13:53:35.022 shell.go:Flags() - 42ns
[DEBUG] 13:53:35.022 properties.go:GetBool:22 → mapped_locations_enabled: true
[DEBUG] 13:53:35.022 properties.go:GetString:28 → 
[DEBUG] 13:53:35.022 properties.go:GetString:28 → 
[TRACE] 13:53:35.022 shell.go:GOOS() - 42ns
[DEBUG] 13:53:35.022 properties.go:GetString:28 →  
[DEBUG] 13:53:35.022 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[TRACE] 13:53:35.022 shell.go:PathSeparator() - 42ns
[TRACE] 13:53:35.022 shell.go:GOOS() - 41ns
[TRACE] 13:53:35.022 shell.go:GOOS() - 42ns
[TRACE] 13:53:35.022 shell.go:GOOS() - 0s
[TRACE] 13:53:35.022 shell.go:GOOS() - 41ns
[TRACE] 13:53:35.022 shell.go:PathSeparator() - 0s
[TRACE] 13:53:35.022 shell.go:PathSeparator() - 0s
[TRACE] 13:53:35.022 shell.go:GOOS() - 0s
[TRACE] 13:53:35.022 shell.go:GOOS() - 42ns
[TRACE] 13:53:35.022 shell.go:PathSeparator() - 41ns
[TRACE] 13:53:35.022 shell.go:GOOS() - 42ns
[TRACE] 13:53:35.022 shell.go:GOOS() - 42ns
[TRACE] 13:53:35.022 shell.go:PathSeparator() - 0s
[TRACE] 13:53:35.022 shell.go:GOOS() - 42ns
[TRACE] 13:53:35.022 shell.go:GOOS() - 41ns
[TRACE] 13:53:35.022 shell.go:PathSeparator() - 42ns
[TRACE] 13:53:35.022 shell.go:Pwd() - 41ns
[DEBUG] 13:53:35.022 shell_unix.go:IsWsl:35 → false
[TRACE] 13:53:35.022 shell_unix.go:IsWsl() - 2.125µs
[TRACE] 13:53:35.022 shell.go:StackCount() - 42ns
[TRACE] 13:53:35.022 shell_unix.go:DirIsWritable(/Users/janegilring) - 13.5µs
[TRACE] 13:53:35.022 shell.go:TemplateCache() - 83ns
[TRACE] 13:53:35.023 shell.go:TemplateCache() - 42ns
[TRACE] 13:53:35.023 shell.go:Shell() - 42ns
[DEBUG] 13:53:35.023 block.go:Debug:280 → Segment: git
[TRACE] 13:53:35.023 shell.go:Pwd() - 41ns
[TRACE] 13:53:35.023 shell.go:GOOS() - 41ns
[DEBUG] 13:53:35.023 shell_unix.go:IsWsl:35 → false
[TRACE] 13:53:35.023 shell_unix.go:IsWsl() - 1.375µs
[TRACE] 13:53:35.023 shell_unix.go:IsWsl2() - 2.75µs
[TRACE] 13:53:35.023 shell.go:GOOS() - 42ns
[DEBUG] 13:53:35.023 shell.go:CommandPath:589 → /usr/bin/git
[TRACE] 13:53:35.023 shell.go:CommandPath(git) - 57.917µs
[TRACE] 13:53:35.023 shell.go:HasCommand(git) - 59.541µs
[TRACE] 13:53:35.023 shell.go:Pwd() - 42ns
[ERROR] 13:53:35.023 shell.go:HasParentFilePath:723 → stat .git: no such file or directory
[TRACE] 13:53:35.023 shell.go:HasParentFilePath(.git) - 19µs
[DEBUG] 13:53:35.023 properties.go:GetBool:22 → fetch_bare_info: false
[DEBUG] 13:53:35.023 block.go:Debug:280 → Segment: executiontime
[TRACE] 13:53:35.023 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.023 shell.go:GOOS() - 42ns
[DEBUG] 13:53:35.023 properties.go:GetBool:22 → always_enabled: false
[TRACE] 13:53:35.023 shell.go:ExecutionTime() - 84ns
[DEBUG] 13:53:35.023 properties.go:GetFloat64:34 → threshold: 0.000000
[DEBUG] 13:53:35.023 properties.go:GetString:28 → roundrock
[TRACE] 13:53:35.023 shell.go:TemplateCache() - 42ns
[TRACE] 13:53:35.023 shell.go:TemplateCache() - 42ns
[TRACE] 13:53:35.023 shell.go:Shell() - 42ns
[TRACE] 13:53:35.023 shell.go:Flags() - 0s
[DEBUG] 13:53:35.023 block.go:Debug:280 → Segment: shell
[TRACE] 13:53:35.023 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.023 shell.go:GOOS() - 42ns
[DEBUG] 13:53:35.023 properties.go:GetKeyValueMap:46 → mapped_shell_names: map[]
[TRACE] 13:53:35.023 shell.go:Shell() - 42ns
[TRACE] 13:53:35.023 shell.go:Flags() - 42ns
[TRACE] 13:53:35.023 shell.go:TemplateCache() - 41ns
[TRACE] 13:53:35.023 shell.go:TemplateCache() - 42ns
[TRACE] 13:53:35.023 shell.go:Shell() - 42ns
[DEBUG] 13:53:35.023 block.go:Debug:280 → Segment: sysinfo
[DEBUG] 13:53:35.023 properties.go:GetInt:40 → precision: 2
[TRACE] 13:53:35.023 shell.go:Pwd() - 83ns
[TRACE] 13:53:35.023 shell.go:GOOS() - 0s
[TRACE] 13:53:35.023 shell.go:TemplateCache() - 42ns
[TRACE] 13:53:35.023 shell.go:TemplateCache() - 0s
[TRACE] 13:53:35.023 shell.go:Shell() - 42ns
[DEBUG] 13:53:35.023 block.go:Debug:280 → Segment: angular
[TRACE] 13:53:35.023 shell.go:Pwd() - 41ns
[TRACE] 13:53:35.023 shell.go:GOOS() - 42ns
[DEBUG] 13:53:35.023 properties.go:GetStringArray:52 → extensions: [angular.json]
[DEBUG] 13:53:35.023 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.023 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.023 shell.go:Pwd() - 41ns
[DEBUG] 13:53:35.023 block.go:Debug:280 → Segment: aws
[TRACE] 13:53:35.023 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.023 shell.go:GOOS() - 42ns
[DEBUG] 13:53:35.023 properties.go:GetBool:22 → display_default: true
[DEBUG] 13:53:35.023 shell.go:Getenv:387 → NO DATA
[TRACE] 13:53:35.023 shell.go:Getenv(AWS_VAULT) - 1.209µs
[DEBUG] 13:53:35.023 shell.go:Getenv:387 → NO DATA
[TRACE] 13:53:35.023 shell.go:Getenv(AWS_DEFAULT_PROFILE) - 1.125µs
[DEBUG] 13:53:35.023 shell.go:Getenv:387 → NO DATA
[TRACE] 13:53:35.023 shell.go:Getenv(AWS_PROFILE) - 1µs
[DEBUG] 13:53:35.023 shell.go:Getenv:387 → NO DATA
[TRACE] 13:53:35.023 shell.go:Getenv(AWS_REGION) - 875ns
[DEBUG] 13:53:35.023 shell.go:Getenv:387 → NO DATA
[TRACE] 13:53:35.023 shell.go:Getenv(AWS_DEFAULT_REGION) - 1µs
[DEBUG] 13:53:35.023 shell.go:Getenv:387 → NO DATA
[TRACE] 13:53:35.023 shell.go:Getenv(AWS_CONFIG_FILE) - 958ns
[ERROR] 13:53:35.023 shell.go:FileContent:508 → open /Users/janegilring/.aws/config: no such file or directory
[TRACE] 13:53:35.023 shell.go:FileContent(/Users/janegilring/.aws/config) - 4.792µs
[DEBUG] 13:53:35.023 block.go:Debug:280 → Segment: az
[TRACE] 13:53:35.023 shell.go:Pwd() - 0s
[TRACE] 13:53:35.023 shell.go:GOOS() - 42ns
[DEBUG] 13:53:35.023 properties.go:GetString:28 → first_match
[DEBUG] 13:53:35.023 shell.go:Getenv:387 → NO DATA
[TRACE] 13:53:35.023 shell.go:Getenv(AZURE_CONFIG_DIR) - 1.042µs
[DEBUG] 13:53:35.023 shell.go:HasFilesInDir:453 → false
[TRACE] 13:53:35.023 shell.go:HasFilesInDir(azureProfile.json) - 5.834µs
[DEBUG] 13:53:35.023 shell.go:HasFilesInDir:453 → false
[TRACE] 13:53:35.023 shell.go:HasFilesInDir(azureProfile.json) - 2.667µs
[DEBUG] 13:53:35.023 shell.go:Getenv:387 → NO DATA
[TRACE] 13:53:35.023 shell.go:Getenv(POSH_AZURE_SUBSCRIPTION) - 1.042µs
[DEBUG] 13:53:35.023 block.go:Debug:280 → Segment: azfunc
[TRACE] 13:53:35.023 shell.go:Pwd() - 0s
[TRACE] 13:53:35.023 shell.go:GOOS() - 0s
[DEBUG] 13:53:35.023 properties.go:GetStringArray:52 → extensions: [host.json local.settings.json function.json]
[DEBUG] 13:53:35.023 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.023 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.023 shell.go:Pwd() - 42ns
[DEBUG] 13:53:35.023 block.go:Debug:280 → Segment: cds
[DEBUG] 13:53:35.023 properties.go:GetString:28 → context
[TRACE] 13:53:35.023 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.023 shell.go:GOOS() - 42ns
[DEBUG] 13:53:35.023 properties.go:GetStringArray:52 → extensions: [.cdsrc.json .cdsrc-private.json *.cds]
[DEBUG] 13:53:35.023 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.023 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.023 shell.go:Pwd() - 42ns
[DEBUG] 13:53:35.023 block.go:Debug:280 → Segment: crystal
[TRACE] 13:53:35.023 shell.go:Pwd() - 0s
[TRACE] 13:53:35.023 shell.go:GOOS() - 42ns
[DEBUG] 13:53:35.023 properties.go:GetStringArray:52 → extensions: [*.cr shard.yml]
[DEBUG] 13:53:35.023 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.023 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.023 shell.go:Pwd() - 41ns
[DEBUG] 13:53:35.023 block.go:Debug:280 → Segment: cf
[DEBUG] 13:53:35.023 properties.go:GetString:28 → files
[TRACE] 13:53:35.023 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.023 shell.go:GOOS() - 41ns
[DEBUG] 13:53:35.023 properties.go:GetStringArray:52 → extensions: [manifest.yml mta.yaml]
[DEBUG] 13:53:35.023 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.023 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.023 shell.go:Pwd() - 42ns
[DEBUG] 13:53:35.023 block.go:Debug:280 → Segment: cftarget
[TRACE] 13:53:35.023 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.023 shell.go:GOOS() - 0s
[ERROR] 13:53:35.023 shell.go:CommandPath:592 → exec: "cf": executable file not found in $PATH
[TRACE] 13:53:35.023 shell.go:CommandPath(cf) - 28.75µs
[TRACE] 13:53:35.023 shell.go:HasCommand(cf) - 30.083µs
[DEBUG] 13:53:35.023 block.go:Debug:280 → Segment: cmake
[TRACE] 13:53:35.023 shell.go:Pwd() - 0s
[TRACE] 13:53:35.023 shell.go:GOOS() - 41ns
[DEBUG] 13:53:35.023 properties.go:GetStringArray:52 → extensions: [*.cmake CMakeLists.txt]
[DEBUG] 13:53:35.023 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.023 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.023 shell.go:Pwd() - 42ns
[DEBUG] 13:53:35.023 block.go:Debug:280 → Segment: dart
[TRACE] 13:53:35.023 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.023 shell.go:GOOS() - 42ns
[DEBUG] 13:53:35.023 properties.go:GetStringArray:52 → extensions: [*.dart pubspec.yaml pubspec.yml pubspec.lock]
[DEBUG] 13:53:35.023 properties.go:GetStringArray:52 → folders: [.dart_tool]
[DEBUG] 13:53:35.023 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.023 shell.go:Pwd() - 41ns
[DEBUG] 13:53:35.023 block.go:Debug:280 → Segment: dotnet
[TRACE] 13:53:35.023 shell.go:Pwd() - 41ns
[TRACE] 13:53:35.023 shell.go:GOOS() - 42ns
[DEBUG] 13:53:35.023 properties.go:GetStringArray:52 → extensions: [*.cs *.csx *.vb *.sln *.slnf *.csproj *.vbproj *.fs *.fsx *.fsproj global.json]
[DEBUG] 13:53:35.023 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.023 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.023 shell.go:Pwd() - 41ns
[DEBUG] 13:53:35.023 block.go:Debug:280 → Segment: flutter
[TRACE] 13:53:35.023 shell.go:Pwd() - 0s
[TRACE] 13:53:35.023 shell.go:GOOS() - 0s
[DEBUG] 13:53:35.023 properties.go:GetStringArray:52 → extensions: [*.dart pubspec.yaml pubspec.yml pubspec.lock]
[DEBUG] 13:53:35.023 properties.go:GetStringArray:52 → folders: [.dart_tool]
[DEBUG] 13:53:35.024 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.024 shell.go:Pwd() - 42ns
[DEBUG] 13:53:35.024 block.go:Debug:280 → Segment: go
[TRACE] 13:53:35.024 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.024 shell.go:GOOS() - 42ns
[DEBUG] 13:53:35.024 properties.go:GetStringArray:52 → extensions: [*.go go.mod]
[DEBUG] 13:53:35.024 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.024 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.024 shell.go:Pwd() - 0s
[DEBUG] 13:53:35.024 block.go:Debug:280 → Segment: haskell
[DEBUG] 13:53:35.024 properties.go:GetString:28 → never
[TRACE] 13:53:35.024 shell.go:Pwd() - 0s
[TRACE] 13:53:35.024 shell.go:GOOS() - 0s
[DEBUG] 13:53:35.024 properties.go:GetStringArray:52 → extensions: [*.hs *.lhs stack.yaml package.yaml *.cabal cabal.project]
[DEBUG] 13:53:35.024 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.024 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.024 shell.go:Pwd() - 42ns
[DEBUG] 13:53:35.024 block.go:Debug:280 → Segment: java
[DEBUG] 13:53:35.024 shell.go:Getenv:387 → NO DATA
[TRACE] 13:53:35.024 shell.go:Getenv(JAVA_HOME) - 1.042µs
[TRACE] 13:53:35.024 shell.go:Pwd() - 0s
[TRACE] 13:53:35.024 shell.go:GOOS() - 0s
[DEBUG] 13:53:35.024 properties.go:GetStringArray:52 → extensions: [pom.xml build.gradle.kts build.sbt .java-version .deps.edn project.clj build.boot *.java *.class *.gradle *.jar *.clj *.cljc]
[DEBUG] 13:53:35.024 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.024 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.024 shell.go:Pwd() - 42ns
[DEBUG] 13:53:35.024 block.go:Debug:280 → Segment: julia
[TRACE] 13:53:35.024 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.024 shell.go:GOOS() - 0s
[DEBUG] 13:53:35.024 properties.go:GetStringArray:52 → extensions: [*.jl]
[DEBUG] 13:53:35.024 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.024 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.024 shell.go:Pwd() - 42ns
[DEBUG] 13:53:35.024 block.go:Debug:280 → Segment: kotlin
[TRACE] 13:53:35.024 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.024 shell.go:GOOS() - 41ns
[DEBUG] 13:53:35.024 properties.go:GetStringArray:52 → extensions: [*.kt *.kts *.ktm]
[DEBUG] 13:53:35.024 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.024 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.024 shell.go:Pwd() - 0s
[DEBUG] 13:53:35.024 block.go:Debug:280 → Segment: kubectl
[TRACE] 13:53:35.024 shell.go:Pwd() - 0s
[TRACE] 13:53:35.024 shell.go:GOOS() - 42ns
[DEBUG] 13:53:35.024 properties.go:GetBool:22 → parse_kubeconfig: false
[DEBUG] 13:53:35.024 shell.go:CommandPath:589 → /usr/local/bin/kubectl
[TRACE] 13:53:35.024 shell.go:CommandPath(kubectl) - 16.667µs
[TRACE] 13:53:35.024 shell.go:HasCommand(kubectl) - 18.084µs
[ERROR] 13:53:35.048 shell.go:RunCommand:566 → exit status 1
[DEBUG] 13:53:35.048 shell.go:RunCommand:568 ↓
    error: current-context must exist in order to minify

[TRACE] 13:53:35.048 shell.go:RunCommand(kubectl config view --output yaml --minify) - 24.495208ms
[DEBUG] 13:53:35.048 properties.go:GetBool:22 → display_error: false
[DEBUG] 13:53:35.048 block.go:Debug:280 → Segment: lua
[DEBUG] 13:53:35.048 properties.go:GetString:28 → lua
[TRACE] 13:53:35.048 shell.go:Pwd() - 83ns
[TRACE] 13:53:35.048 shell.go:GOOS() - 41ns
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → extensions: [*.lua *.rockspec]
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → folders: [lua]
[DEBUG] 13:53:35.048 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.048 shell.go:Pwd() - 42ns
[DEBUG] 13:53:35.048 block.go:Debug:280 → Segment: node
[TRACE] 13:53:35.048 shell.go:Pwd() - 0s
[TRACE] 13:53:35.048 shell.go:GOOS() - 0s
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → extensions: [*.js *.ts package.json .nvmrc pnpm-workspace.yaml .pnpmfile.cjs .npmrc .vue]
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.048 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.048 shell.go:Pwd() - 42ns
[DEBUG] 13:53:35.048 block.go:Debug:280 → Segment: nx
[TRACE] 13:53:35.048 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.048 shell.go:GOOS() - 41ns
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → extensions: [workspace.json nx.json]
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.048 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.048 shell.go:Pwd() - 42ns
[DEBUG] 13:53:35.048 block.go:Debug:280 → Segment: perl
[TRACE] 13:53:35.048 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.048 shell.go:GOOS() - 0s
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → extensions: [.perl-version *.pl *.pm *.t]
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.048 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.048 shell.go:Pwd() - 42ns
[DEBUG] 13:53:35.048 block.go:Debug:280 → Segment: php
[TRACE] 13:53:35.048 shell.go:Pwd() - 0s
[TRACE] 13:53:35.048 shell.go:GOOS() - 42ns
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → extensions: [*.php composer.json composer.lock .php-version blade.php]
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.048 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.048 shell.go:Pwd() - 0s
[DEBUG] 13:53:35.048 block.go:Debug:280 → Segment: python
[DEBUG] 13:53:35.048 properties.go:GetString:28 → environment
[TRACE] 13:53:35.048 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.048 shell.go:GOOS() - 0s
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → extensions: [*.py *.ipynb pyproject.toml venv.bak]
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → folders: [.venv venv virtualenv env venv-win pyenv-win]
[DEBUG] 13:53:35.048 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.048 shell.go:Pwd() - 0s
[DEBUG] 13:53:35.048 block.go:Debug:280 → Segment: r
[TRACE] 13:53:35.048 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.048 shell.go:GOOS() - 42ns
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → extensions: [*.R *.Rmd *.Rsx *.Rda *.Rd *.Rproj .Rproj.user]
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.048 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.048 shell.go:Pwd() - 41ns
[DEBUG] 13:53:35.048 block.go:Debug:280 → Segment: ruby
[TRACE] 13:53:35.048 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.048 shell.go:GOOS() - 41ns
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → extensions: [*.rb Rakefile Gemfile]
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.048 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.048 shell.go:Pwd() - 42ns
[DEBUG] 13:53:35.048 block.go:Debug:280 → Segment: rust
[TRACE] 13:53:35.048 shell.go:Pwd() - 42ns
[TRACE] 13:53:35.048 shell.go:GOOS() - 0s
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → extensions: [*.rs Cargo.toml Cargo.lock]
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.048 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.048 shell.go:Pwd() - 42ns
[DEBUG] 13:53:35.048 block.go:Debug:280 → Segment: swift
[TRACE] 13:53:35.048 shell.go:Pwd() - 41ns
[TRACE] 13:53:35.048 shell.go:GOOS() - 41ns
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → extensions: [*.swift *.SWIFT]
[DEBUG] 13:53:35.048 properties.go:GetStringArray:52 → folders: []
[DEBUG] 13:53:35.048 properties.go:GetBool:22 → home_enabled: false
[TRACE] 13:53:35.048 shell.go:Pwd() - 42ns
[DEBUG] 13:53:35.048 block.go:Debug:280 → Segment: time
[TRACE] 13:53:35.048 shell.go:Pwd() - 0s
[TRACE] 13:53:35.048 shell.go:GOOS() - 41ns
[DEBUG] 13:53:35.048 properties.go:GetString:28 → 15:04:05
[TRACE] 13:53:35.048 shell.go:TemplateCache() - 291ns
[TRACE] 13:53:35.049 shell.go:TemplateCache() - 167ns
[TRACE] 13:53:35.049 shell.go:Shell() - 42ns
[TRACE] 13:53:35.049 shell.go:Flags() - 42ns
[DEBUG] 13:53:35.049 block.go:Debug:280 → Segment: text
[TRACE] 13:53:35.049 shell.go:Pwd() - 125ns
[TRACE] 13:53:35.049 shell.go:GOOS() - 0s
[TRACE] 13:53:35.049 shell.go:TemplateCache() - 42ns
[TRACE] 13:53:35.049 shell.go:Shell() - 42ns
[DEBUG] 13:53:35.049 block.go:Debug:280 → Segment: spotify
[TRACE] 13:53:35.049 shell.go:Pwd() - 0s
[TRACE] 13:53:35.049 shell.go:GOOS() - 0s
[DEBUG] 13:53:35.073 shell.go:RunCommand:568 → true
[TRACE] 13:53:35.073 shell.go:RunCommand(osascript -e application "Spotify" is running) - 23.922583ms
[DEBUG] 13:53:35.198 shell.go:RunCommand:568 → playing
[TRACE] 13:53:35.198 shell.go:RunCommand(osascript -e tell application "Spotify" to player state as string) - 124.920334ms
[DEBUG] 13:53:35.329 shell.go:RunCommand:568 → Gabriel Thomas
[TRACE] 13:53:35.329 shell.go:RunCommand(osascript -e tell application "Spotify" to artist of current track as string) - 130.954375ms
[DEBUG] 13:53:35.459 shell.go:RunCommand:568 → Ascension
[TRACE] 13:53:35.459 shell.go:RunCommand(osascript -e tell application "Spotify" to name of current track as string) - 130.613291ms
[DEBUG] 13:53:35.459 properties.go:GetString:28 → 
[TRACE] 13:53:35.459 shell.go:TemplateCache() - 333ns
[TRACE] 13:53:35.460 shell.go:TemplateCache() - 42ns
[TRACE] 13:53:35.460 shell.go:Shell() - 125ns
[DEBUG] 13:53:35.460 block.go:Debug:280 → Segment: status
[DEBUG] 13:53:35.460 properties.go:GetString:28 → {{ .Code }}
[TRACE] 13:53:35.460 shell.go:Pwd() - 167ns
[TRACE] 13:53:35.460 shell.go:GOOS() - 42ns
[TRACE] 13:53:35.460 shell.go:StatusCodes() - 42ns
[TRACE] 13:53:35.460 shell.go:TemplateCache() - 125ns
[DEBUG] 13:53:35.460 properties.go:GetBool:22 → always_enabled: true
[TRACE] 13:53:35.460 shell.go:TemplateCache() - 42ns
[TRACE] 13:53:35.460 shell.go:Shell() - 42ns
[TRACE] 13:53:35.460 shell.go:TemplateCache() - 42ns
[DEBUG] 13:53:35.460 shell.go:Getenv:387 → NO DATA
[TRACE] 13:53:35.460 shell.go:Getenv(XDG_CACHE_HOME) - 2.875µs
[TRACE] 13:53:35.460 shell_unix.go:CachePath() - 34.5µs
[TRACE] 13:53:35.460 shell.go:Flags() - 41ns
JanDeDobbeleer commented 1 year ago

@janegilring that statement is completely invalid though. You're overriding the prompt function with one that overrides the function again... This is in no way supported.

janegilring commented 1 year ago

Ok, maybe I used incorrect wording. Isn't it supported to start with one prompt where oh-my-posh is not enabled and after the first prompt's thread job is finished enable oh-my-posh? Also, why is it working on Windows?

JanDeDobbeleer commented 1 year ago

@janegilring good question, no idea. I can have a look at solving the issue though, it's seeing why the default initialization is different per platform, that's strange as the code is identical in that area.

janegilring commented 1 year ago

Thanks.

I also tried to install the latest versions of v17 and v16 just to see if it behaves differently with previous versions.

The only difference I noticed is that the error is slightly different in v16: Error: invalid argument "" for "--no-exit-code" flag: strconv.ParseBool: parsing "": invalid syntax

I have also tried on Linux (Ubuntu 22.04), and the issue is present there as well.

janegilring commented 1 year ago

Thanks for the quick fix, I've upgraded and verified it's resolved 👌

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