Closed Ashton-Sidhu closed 2 months ago
As of version 21.23.4 the transient prompt is not working. I downloaded the binary for 21.23.1 and confirm that it was working for that version.
21.23.4
21.23.1
#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json version = 2 final_space = true console_title_template = '{{ .Shell }} in {{ .Folder }}' [[blocks]] type = 'prompt' alignment = 'left' newline = true [[blocks.segments]] type = 'path' style = 'plain' background = 'transparent' foreground = 'blue' template = '{{ .Path }}' [blocks.segments.properties] style = 'full' [[blocks.segments]] type = 'git' style = 'plain' foreground = 'p:grey' background = 'transparent' template = ' {{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}*{{ end }} <cyan>{{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}</>' [blocks.segments.properties] branch_icon = '' commit_icon = '@' fetch_status = true [[blocks]] type = 'rprompt' overflow = 'hidden' [[blocks.segments]] type = 'executiontime' style = 'plain' foreground = 'yellow' background = 'transparent' template = '{{ .FormattedMs }}' [blocks.segments.properties] threshold = 5000 [[blocks]] type = 'prompt' alignment = 'left' newline = true [[blocks.segments]] type = 'text' style = 'plain' foreground_templates = [ "{{if gt .Code 0}}red{{end}}", "{{if eq .Code 0}}magenta{{end}}", ] background = 'transparent' template = '❯' [transient_prompt] foreground_templates = [ "{{if gt .Code 0}}red{{end}}", "{{if eq .Code 0}}magenta{{end}}", ] background = 'transparent' template = '❯ ' [secondary_prompt] foreground = 'magenta' background = 'transparent' template = '❯❯ '
macOS
zsh
Version: 21.23.4 Shell: zsh (5.9) Prompt: ~ ❯ Segments: ConsoleTitle(true) - 0 ms Path(true) - 0 ms Executiontime(false) - 0 ms Text(true) - 0 ms Run duration: 3.506167ms Cache path: /Users/sidhu/.cache/oh-my-posh Config path: /Users/sidhu/.config/ohmyposh/config.toml Logs: [DEBUG] 12:55:28.550 os.go:Getenv:306 → NO DATA [TRACE] 12:55:28.550 os.go:Getenv(OMP_CACHE_DIR) - 118.333µs [DEBUG] 12:55:28.550 os.go:Getenv:306 → NO DATA [TRACE] 12:55:28.550 os.go:Getenv(XDG_CACHE_HOME) - 2.667µs [TRACE] 12:55:28.550 os_unix.go:CachePath() - 143.25µs [DEBUG] 12:55:28.551 os.go:Getenv:306 → /Users/sidhu/.config/ohmyposh/config.toml [TRACE] 12:55:28.551 os.go:Getenv(POSH_THEME) - 3.417µs [DEBUG] 12:55:28.551 os_unix.go:Platform:87 → darwin [TRACE] 12:55:28.551 os.go:resolveConfigPath() - 10.75µs [TRACE] 12:55:28.551 os.go:Init() - 440.708µs [TRACE] 12:55:28.551 os.go:Flags() - 42ns [TRACE] 12:55:28.551 load.go:loadConfig() - 142.375µs [TRACE] 12:55:28.551 os.go:Flags() - 42ns [DEBUG] 12:55:28.551 debug.go:44 → Terminal shell: %s shell [DEBUG] 12:55:28.551 debug.go:44 → Terminal program: %s Unknown [DEBUG] 12:55:28.551 os.go:Getenv:306 → NO DATA [TRACE] 12:55:28.551 os.go:Getenv(OMP_CACHE_DISABLED) - 4.666µs [DEBUG] 12:55:28.551 os.go:Shell:581 → no shell name provided in flags, trying to detect it [DEBUG] 12:55:28.551 os.go:Shell:589 → process name: zsh [TRACE] 12:55:28.551 os.go:Shell() - 164.334µs [DEBUG] 12:55:28.551 os.go:Getenv:306 → 5.9 [TRACE] 12:55:28.551 os.go:Getenv(POSH_SHELL_VERSION) - 3.292µs [DEBUG] 12:55:28.551 debug.go:PrintDebug:23 → Segment: Title [DEBUG] 12:55:28.551 text.go:Render:73 → Rendering template: {{ .Shell }} in {{ .Folder }} [TRACE] 12:55:28.551 os_unix.go:Root() - 584ns [TRACE] 12:55:28.551 os.go:Shell() - 84ns [TRACE] 12:55:28.551 os.go:StatusCodes() - 84ns [DEBUG] 12:55:28.551 os_unix.go:IsWsl:35 → false [TRACE] 12:55:28.551 os_unix.go:IsWsl() - 3µs [DEBUG] 12:55:28.551 os.go:TemplateCache:789 → environment: [ALACRITTY_LOG=/var/folders/9j/x5st6h4n0nj9cywpqljkgv9h0000gn/T/Alacritty-35384.log ALACRITTY_SOCKET=/var/folders/9j/x5st6h4n0nj9cywpqljkgv9h0000gn/T/Alacritty-35384.sock ALACRITTY_WINDOW_ID=5434834896 COLORTERM=truecolor COMMAND_MODE=unix2003 CONDA_PROMPT_MODIFIER=false HOME=/Users/sidhu HOMEBREW_CELLAR=/opt/homebrew/Cellar HOMEBREW_PREFIX=/opt/homebrew HOMEBREW_REPOSITORY=/opt/homebrew INFOPATH=/opt/homebrew/share/info:/opt/homebrew/share/info:/opt/homebrew/share/info: LC_ALL=en_CA.UTF-8 LOGNAME=sidhu MANPATH=/opt/homebrew/share/man:/opt/homebrew/share/man:/opt/homebrew/share/man:::: OLDPWD=/Users/sidhu/dotfiles PATH=/Users/sidhu/anaconda3/bin:/Users/sidhu/.poetry/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/sidhu/Library/Python/3.12/bin:/Users/sidhu/go/bin:/Users/sidhu/.local/bin:/Users/sidhu/anaconda3/bin:/Users/sidhu/.poetry/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/sidhu/anaconda3/bin:/Users/sidhu/.poetry/bin:/Users/sidhu/.local/share/zinit/polaris/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/sidhu/.cargo/bin:/Users/sidhu/Library/Python/3.9/bin:/Users/sidhu/go/bin:/Users/sidhu/.local/bin:/usr/bin:/bin:/usr/sbin:/sbin PMSPEC=0uUpiPsf POSH_PID=35737 POSH_PROMPT_COUNT=13 POSH_SHELL_VERSION=5.9 POSH_THEME=/Users/sidhu/.config/ohmyposh/config.toml POWERLINE_COMMAND=oh-my-posh PWD=/Users/sidhu SHELL=/bin/zsh SHLVL=2 SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.pzVGrMT6m7/Listeners TERM=xterm-256color TMPDIR=/var/folders/9j/x5st6h4n0nj9cywpqljkgv9h0000gn/T/ USER=sidhu WINDOWID=5434834896 XPC_FLAGS=0x0 XPC_SERVICE_NAME=0 ZELLIJ=0 ZELLIJ_PANE_ID=0 ZELLIJ_SESSION_NAME=fabulous-ukulele ZLE_RPROMPT_INDENT=0 ZPFX=/Users/sidhu/.local/share/zinit/polaris ZSH_CACHE_DIR=/Users/sidhu/.cache/zinit __CFBundleIdentifier=org.alacritty __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x52 _=/opt/homebrew/bin/oh-my-posh] [TRACE] 12:55:28.551 os.go:GOOS() - 42ns [DEBUG] 12:55:28.551 os.go:Pwd:336 → /Users/sidhu [TRACE] 12:55:28.551 os.go:Pwd() - 24.541µs [DEBUG] 12:55:28.551 os_unix.go:IsWsl:35 → false [TRACE] 12:55:28.551 os_unix.go:IsWsl() - 5.041µs [TRACE] 12:55:28.551 os.go:GOOS() - 42ns [TRACE] 12:55:28.551 os.go:GOOS() - 41ns [TRACE] 12:55:28.551 os.go:GOOS() - 42ns [TRACE] 12:55:28.551 os.go:GOOS() - 42ns [TRACE] 12:55:28.551 os.go:GOOS() - 42ns [TRACE] 12:55:28.551 os.go:GOOS() - 42ns [TRACE] 12:55:28.551 os.go:GOOS() - 42ns [DEBUG] 12:55:28.551 os.go:User:474 → sidhu [TRACE] 12:55:28.551 os.go:User() - 2.25µs [DEBUG] 12:55:28.551 os.go:Host:491 → HLUSMAC038 [TRACE] 12:55:28.551 os.go:Host() - 7.5µs [TRACE] 12:55:28.551 os.go:GOOS() - 42ns [DEBUG] 12:55:28.551 os.go:Getenv:306 → 2 [TRACE] 12:55:28.551 os.go:Getenv(SHLVL) - 2.125µs [TRACE] 12:55:28.551 os.go:TemplateCache() - 115.375µs [TRACE] 12:55:28.551 os.go:Shell() - 42ns [DEBUG] 12:55:28.551 os.go:Getenv:306 → NO DATA [TRACE] 12:55:28.551 os.go:Getenv(POSH_CURSOR_LINE) - 14.375µs [DEBUG] 12:55:28.551 os.go:Getenv:306 → NO DATA [TRACE] 12:55:28.551 os.go:Getenv(POSH_CURSOR_COLUMN) - 1.833µs [TRACE] 12:55:28.551 os.go:Flags() - 42ns [TRACE] 12:55:28.551 os.go:Flags() - 0s [TRACE] 12:55:28.551 os.go:Flags() - 83ns [TRACE] 12:55:28.551 os.go:Pwd() - 42ns [TRACE] 12:55:28.551 os.go:GOOS() - 42ns [DEBUG] 12:55:28.551 segment.go:SetEnabled:115 → Segment: Git [DEBUG] 12:55:28.551 os_unix.go:IsWsl:35 → false [TRACE] 12:55:28.551 os_unix.go:IsWsl() - 2.375µs [TRACE] 12:55:28.551 os_unix.go:IsWsl2() - 4.5µs [TRACE] 12:55:28.551 os.go:GOOS() - 0s [TRACE] 12:55:28.551 os.go:Flags() - 166ns [TRACE] 12:55:28.551 os.go:Pwd() - 166ns [TRACE] 12:55:28.551 os.go:GOOS() - 84ns [DEBUG] 12:55:28.551 segment.go:SetEnabled:115 → Segment: Path [DEBUG] 12:55:28.551 os.go:CommandPath:533 → /usr/bin/git [TRACE] 12:55:28.551 os.go:CommandPath(git) - 89.375µs [TRACE] 12:55:28.551 os.go:HasCommand(git) - 91.916µs [TRACE] 12:55:28.551 os.go:Pwd() - 41ns [DEBUG] 12:55:28.551 path.go:124 → display_cygpath: false [TRACE] 12:55:28.551 os.go:GOOS() - 42ns [TRACE] 12:55:28.551 os.go:PathSeparator() - 42ns [TRACE] 12:55:28.551 os.go:Pwd() - 41ns [TRACE] 12:55:28.551 os.go:Shell() - 83ns [TRACE] 12:55:28.551 os.go:Shell() - 41ns [DEBUG] 12:55:28.551 os.go:ResolveSymlink:433 → /Users/sidhu [TRACE] 12:55:28.551 os.go:ResolveSymlink(/Users/sidhu) - 30.833µs [DEBUG] 12:55:28.551 path.go:replaceMappedLocations:517 → mapped_locations_enabled: true [DEBUG] 12:55:28.551 path.go:replaceMappedLocations:518 → [DEBUG] 12:55:28.552 path.go:replaceMappedLocations:519 → [TRACE] 12:55:28.552 os.go:GOOS() - 42ns [DEBUG] 12:55:28.552 path.go:replaceMappedLocations:520 → ~ [DEBUG] 12:55:28.552 path.go:replaceMappedLocations:525 → mapped_locations: map[] [ERROR] 12:55:28.552 os.go:HasParentFilePath:697 → stat .git: no such file or directory [TRACE] 12:55:28.552 os.go:HasParentFilePath(.git) - 92.167µs [DEBUG] 12:55:28.552 git.go:shouldDisplay:284 → fetch_bare_info: false [TRACE] 12:55:28.552 os.go:GOOS() - 42ns [TRACE] 12:55:28.552 os.go:GOOS() - 41ns [DEBUG] 12:55:28.552 path.go:makeFolderFormatMap:841 → NO DATA [TRACE] 12:55:28.552 os.go:Pwd() - 42ns [TRACE] 12:55:28.552 os.go:TemplateCache() - 375ns [TRACE] 12:55:28.552 os.go:StackCount() - 42ns [TRACE] 12:55:28.552 os_unix.go:DirIsWritable(/Users/sidhu) - 16.75µs [TRACE] 12:55:28.552 os.go:TemplateCache() - 42ns [DEBUG] 12:55:28.552 text.go:Render:73 → Rendering template: {{ .Path }} [TRACE] 12:55:28.552 os.go:TemplateCache() - 125ns [TRACE] 12:55:28.552 os.go:Shell() - 83ns [DEBUG] 12:55:28.552 text.go:Render:73 → Rendering template: plain [DEBUG] 12:55:28.552 text.go:Render:73 → Rendering template: plain [TRACE] 12:55:28.552 os.go:Shell() - 41ns [TRACE] 12:55:28.552 os.go:Shell() - 41ns [TRACE] 12:55:28.552 os.go:Flags() - 83ns [TRACE] 12:55:28.552 os.go:Pwd() - 84ns [TRACE] 12:55:28.552 os.go:GOOS() - 41ns [DEBUG] 12:55:28.552 segment.go:SetEnabled:115 → Segment: Executiontime [DEBUG] 12:55:28.552 executiontime.go:Enabled:57 → always_enabled: false [TRACE] 12:55:28.552 os.go:ExecutionTime() - 83ns [DEBUG] 12:55:28.552 executiontime.go:Enabled:59 → threshold: 5000.000000 [TRACE] 12:55:28.552 os.go:Shell() - 42ns [TRACE] 12:55:28.552 os.go:Shell() - 0s [TRACE] 12:55:28.552 os.go:Flags() - 42ns [TRACE] 12:55:28.552 os.go:Pwd() - 83ns [TRACE] 12:55:28.552 os.go:GOOS() - 42ns [DEBUG] 12:55:28.552 segment.go:SetEnabled:115 → Segment: Text [TRACE] 12:55:28.552 os.go:TemplateCache() - 41ns [DEBUG] 12:55:28.552 text.go:Render:73 → Rendering template: ❯ [TRACE] 12:55:28.552 os.go:Shell() - 42ns [DEBUG] 12:55:28.552 text.go:Render:73 → Rendering template: {{if gt .Code 0}}red{{end}} [TRACE] 12:55:28.552 os.go:TemplateCache() - 41ns [DEBUG] 12:55:28.552 text.go:Render:73 → Rendering template: {{if eq .Code 0}}magenta{{end}} [TRACE] 12:55:28.553 os.go:TemplateCache() - 166ns [DEBUG] 12:55:28.553 text.go:Render:73 → Rendering template: plain [DEBUG] 12:55:28.553 text.go:Render:73 → Rendering template: {{if gt .Code 0}}red{{end}} [TRACE] 12:55:28.553 os.go:TemplateCache() - 459ns [DEBUG] 12:55:28.553 text.go:Render:73 → Rendering template: {{if eq .Code 0}}magenta{{end}} [TRACE] 12:55:28.554 os.go:TemplateCache() - 83ns [TRACE] 12:55:28.554 os.go:Shell() - 83ns [TRACE] 12:55:28.554 os.go:Shell() - 42ns [TRACE] 12:55:28.554 os.go:Flags() - 41ns [TRACE] 12:55:28.554 os.go:Shell() - 0s [TRACE] 12:55:28.554 os.go:Shell() - 0s [TRACE] 12:55:28.554 os.go:Flags() - 41ns [DEBUG] 12:55:28.554 os.go:Getenv:306 → NO DATA [TRACE] 12:55:28.554 os.go:Getenv(OMP_CACHE_DIR) - 5.666µs [DEBUG] 12:55:28.554 os.go:Getenv:306 → NO DATA [TRACE] 12:55:28.554 os.go:Getenv(XDG_CACHE_HOME) - 2µs [TRACE] 12:55:28.554 os_unix.go:CachePath() - 25.75µs [TRACE] 12:55:28.554 os.go:Flags() - 42ns
@Ashton-Sidhu we are aware, fix is coming this evening if all goes well.
@JanDeDobbeleer Thank you !
Latest will solve this. Just merged the fix.
Code of Conduct
What happened?
As of version
21.23.4
the transient prompt is not working. I downloaded the binary for21.23.1
and confirm that it was working for that version.Theme
What OS are you seeing the problem on?
macOS
Which shell are you using?
zsh
Log output