Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with zsh-autocomplete and a transient prompt #5193

Open
1 task done
D3SOX opened this issue Jul 1, 2024 · 7 comments
Open
1 task done

Incompatibility with zsh-autocomplete and a transient prompt #5193

D3SOX opened this issue Jul 1, 2024 · 7 comments
Assignees
Labels
🐛 bug Something isn't working

Comments

@D3SOX
Copy link

D3SOX commented Jul 1, 2024

Code of Conduct

  • I agree to follow this project's Code of Conduct

What happened?

After installing Oh my Posh I can no longer navigate zsh-autocomplete for example with the arrow keys

Theme

#: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 = '❯❯ '

What OS are you seeing the problem on?

Linux

Which shell are you using?

zsh

Log output

Version: 21.16.2

Shell: zsh (5.9)

Prompt:

~
❯ 

Segments:

ConsoleTitle(true)                         -   0 ms
Path(true)                                 -   0 ms
Executiontime(false)                       -   0 ms
Text(true)                                 -   0 ms

Run duration: 12.841512ms

Cache path: /home/nico/.cache/oh-my-posh

Config path: /home/nico/.config/ohmyposh/zen.toml

Logs:

[DEBUG] 12:30:40.635 shell.go:Getenv:326 → NO DATA
[TRACE] 12:30:40.635 shell.go:Getenv(TERM_PROGRAM) - 8.672929ms
[DEBUG] 12:30:40.635 shell.go:Getenv:326 → NO DATA
[TRACE] 12:30:40.635 shell.go:Getenv(OMP_CACHE_DIR) - 3.19µs
[DEBUG] 12:30:40.635 shell.go:Getenv:326 → /home/nico/.cache
[TRACE] 12:30:40.635 shell.go:Getenv(XDG_CACHE_HOME) - 2.89µs
[TRACE] 12:30:40.635 shell_unix.go:CachePath() - 17.83µs
[DEBUG] 12:30:40.636 shell.go:Getenv:326 → /home/nico/.config/ohmyposh/zen.toml
[TRACE] 12:30:40.636 shell.go:Getenv(POSH_THEME) - 4.091µs
[DEBUG] 12:30:40.636 shell_unix.go:Platform:87 → arch
[TRACE] 12:30:40.636 shell.go:resolveConfigPath() - 13.48µs
[TRACE] 12:30:40.636 shell.go:Init() - 9.936596ms
[TRACE] 12:30:40.636 shell.go:Flags() - 100ns
[TRACE] 12:30:40.636 config.go:loadConfig() - 89.63µs
[TRACE] 12:30:40.636 shell.go:Flags() - 30ns
[DEBUG] 12:30:40.636 shell.go:Getenv:326 → NO DATA
[TRACE] 12:30:40.636 shell.go:Getenv(OMP_CACHE_DISABLED) - 2.96µs
[DEBUG] 12:30:40.636 shell.go:Shell:601 → no shell name provided in flags, trying to detect it
[DEBUG] 12:30:40.637 shell.go:Shell:609 → process name: zsh
[TRACE] 12:30:40.637 shell.go:Shell() - 716.204µs
[DEBUG] 12:30:40.637 shell.go:Getenv:326 → 5.9
[TRACE] 12:30:40.637 shell.go:Getenv(POSH_SHELL_VERSION) - 2.51µs
[DEBUG] 12:30:40.637 debug.go:PrintDebug:22 → Segment: Title
[DEBUG] 12:30:40.637 text.go:Render:72 → Rendering template: {{ .Shell }} in {{ .Folder }}
[TRACE] 12:30:40.637 shell_unix.go:Root() - 250ns
[TRACE] 12:30:40.637 shell.go:Shell() - 70ns
[TRACE] 12:30:40.637 shell.go:StatusCodes() - 40ns
[DEBUG] 12:30:40.637 shell_unix.go:IsWsl:35 → false
[TRACE] 12:30:40.637 shell_unix.go:IsWsl() - 5.609µs
[DEBUG] 12:30:40.637 shell.go:TemplateCache:782 → environment: [BAT_THEME=TwoDark BROWSER=firefox CARGO_HOME=/home/nico/.local/share/cargo COLORFGBG=15;0 COLORTERM=truecolor DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DEBUGINFOD_URLS=https://debuginfod.archlinux.org  DESKTOP_SESSION=plasma DISPLAY=:1 DOTNET_CLI_TELEMETRY_OPTOUT=1 EDITOR=nvim FASTLANE_OPT_OUT_USAGE=1 FREETYPE_PROPERTIES=cff:no-stem-darkening=0 GOPATH=/home/nico/.local/share/go GRADLE_HOME=/usr/share/java/gradle GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/nico/.gtkrc-2.0:/home/nico/.config/gtkrc-2.0 GTK_RC_FILES=/etc/gtk/gtkrc:/home/nico/.gtkrc:/home/nico/.config/gtkrc HG=/usr/bin/hg HOME=/home/nico ICEAUTHORITY=/run/user/1000/iceauth_gKYhPZ IMAGE=gwenview INVOCATION_ID=18bd16c440a24d54a2d0c64992c63eb5 JOURNAL_STREAM=9:15838 KDE_APPLICATIONS_AS_SCOPE=1 KDE_FULL_SESSION=true KDE_SESSION_UID=1000 KDE_SESSION_VERSION=6 KGLOBALACCELD_PLATFORM=org.kde.kwin KONSOLE_DBUS_SERVICE=:1.452 KONSOLE_DBUS_SESSION=/Sessions/1 KONSOLE_DBUS_WINDOW=/Windows/1 KONSOLE_VERSION=240501 LANG=en_US.UTF-8 LANGUAGE=en_US LESSHISTFILE=- LOGNAME=nico MAIL=/var/spool/mail/nico MANAGERPID=11545 MANPAGER=nvim -c 'Man!' - MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/user.slice/user-1000.slice/[email protected]/session.slice/plasma-kwin_wayland.service/memory.pressure MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA= MOTD_SHOWN=pam NODE_REPL_HISTORY= OLDPWD=/home/nico OPENER=xdg-open PAGER=less PAM_KWALLET5_LOGIN=/run/user/1000/kwallet5.socket PATH=/home/nico/.bun/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/android-sdk/platform-tools:/opt/cxoffice/bin:/home/nico/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/opt/rocm/bin:/home/nico/.local/share/JetBrains/Toolbox/scripts:/home/nico/.local/bin/:/home/nico/.yarn/bin/:/home/nico/.local/share/cargo/bin POWERSHELL_TELEMETRY_OPTOUT=1 PROFILEHOME= PWD=/home/nico QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_WAYLAND_RECONNECT=1 READER=okular SESSION_MANAGER=local/nico-pc:@/tmp/.ICE-unix/11799,unix/nico-pc:/tmp/.ICE-unix/11799 SHELL=/usr/bin/zsh SHELL_SESSION_ID=10ea1056b73945ccae28475ded77af2a SSH_AUTH_SOCK=/run/user/1000/gcr/ssh SYSTEMD_EXEC_PID=11616 TERM=xterm-256color TERMINAL=konsole USER=nico VIDEO=mpv VISUAL=nvim WAYLAND_DISPLAY=wayland-0 WINDOWID=3 XAUTHORITY=/run/user/1000/xauth_gbuxAh XDG_CACHE_HOME=/home/nico/.cache XDG_CONFIG_DIRS=/home/nico/.config/kdedefaults:/etc/xdg XDG_CONFIG_HOME=/home/nico/.config XDG_CURRENT_DESKTOP=KDE XDG_DATA_DIRS=/home/nico/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share XDG_DATA_HOME=/home/nico/.local/share XDG_MENU_PREFIX=plasma- XDG_RUNTIME_DIR=/run/user/1000 XDG_SEAT=seat0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 XDG_SESSION_CLASS=user XDG_SESSION_DESKTOP=KDE XDG_SESSION_ID=2 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1 XDG_SESSION_TYPE=wayland XDG_VTNR=1 XKB_DEFAULT_LAYOUT=us XKB_DEFAULT_OPTIONS=caps:escape SHLVL=1 YSU_VERSION=1.7.3 FZF_DEFAULT_COMMAND=fd --type f --hidden --exclude .git POSH_THEME=/home/nico/.config/ohmyposh/zen.toml POSH_SHELL_VERSION=5.9 POSH_PID=2668634 POWERLINE_COMMAND=oh-my-posh CONDA_PROMPT_MODIFIER=false POSH_PROMPT_COUNT=1 ZLE_RPROMPT_INDENT=0 BUN_INSTALL=/home/nico/.bun POSH_CURSOR_LINE=9 POSH_CURSOR_COLUMN=2 _=/usr/bin/oh-my-posh]
[TRACE] 12:30:40.637 shell.go:GOOS() - 70ns
[DEBUG] 12:30:40.637 shell.go:Pwd:356 → /home/nico
[TRACE] 12:30:40.637 shell.go:Pwd() - 9.27µs
[DEBUG] 12:30:40.637 shell_unix.go:IsWsl:35 → false
[TRACE] 12:30:40.637 shell_unix.go:IsWsl() - 2.52µs
[TRACE] 12:30:40.637 shell.go:GOOS() - 30ns
[TRACE] 12:30:40.637 shell.go:GOOS() - 20ns
[TRACE] 12:30:40.637 shell.go:GOOS() - 20ns
[TRACE] 12:30:40.637 shell.go:GOOS() - 30ns
[TRACE] 12:30:40.637 shell.go:GOOS() - 30ns
[TRACE] 12:30:40.637 shell.go:GOOS() - 30ns
[DEBUG] 12:30:40.637 shell.go:User:494 → nico
[TRACE] 12:30:40.637 shell.go:User() - 2.4µs
[DEBUG] 12:30:40.637 shell.go:Host:511 → nico-pc
[TRACE] 12:30:40.637 shell.go:Host() - 3.12µs
[TRACE] 12:30:40.637 shell.go:GOOS() - 30ns
[DEBUG] 12:30:40.637 shell_unix.go:Platform:87 → arch
[DEBUG] 12:30:40.637 shell.go:Getenv:326 → 1
[TRACE] 12:30:40.637 shell.go:Getenv(SHLVL) - 2.15µs
[TRACE] 12:30:40.637 shell.go:TemplateCache() - 104.861µs
[DEBUG] 12:30:40.637 shell.go:Getenv:326 → 9
[TRACE] 12:30:40.637 shell.go:Getenv(POSH_CURSOR_LINE) - 2.5µs
[DEBUG] 12:30:40.637 shell.go:Getenv:326 → 2
[TRACE] 12:30:40.637 shell.go:Getenv(POSH_CURSOR_COLUMN) - 2.13µs
[TRACE] 12:30:40.637 shell.go:Flags() - 40ns
[TRACE] 12:30:40.637 shell.go:Flags() - 30ns
[TRACE] 12:30:40.637 shell.go:Shell() - 30ns
[TRACE] 12:30:40.637 shell.go:Shell() - 30ns
[TRACE] 12:30:40.637 shell.go:Flags() - 30ns
[TRACE] 12:30:40.637 shell.go:Pwd() - 80ns
[TRACE] 12:30:40.637 shell.go:GOOS() - 30ns
[DEBUG] 12:30:40.637 segment.go:SetEnabled:560 → Segment: Git
[TRACE] 12:30:40.637 shell.go:Flags() - 600ns
[DEBUG] 12:30:40.637 shell_unix.go:IsWsl:35 → false
[TRACE] 12:30:40.637 shell_unix.go:IsWsl() - 2.68µs
[TRACE] 12:30:40.637 shell_unix.go:IsWsl2() - 4.9µs
[TRACE] 12:30:40.637 shell.go:GOOS() - 31ns
[TRACE] 12:30:40.637 shell.go:Pwd() - 230ns
[TRACE] 12:30:40.637 shell.go:GOOS() - 50ns
[DEBUG] 12:30:40.637 shell.go:CommandPath:553 → /usr/bin/git
[DEBUG] 12:30:40.637 segment.go:SetEnabled:560 → Segment: Path
[TRACE] 12:30:40.637 shell.go:CommandPath(git) - 13.179µs
[TRACE] 12:30:40.637 shell.go:HasCommand(git) - 15.699µs
[TRACE] 12:30:40.637 shell.go:Pwd() - 40ns
[ERROR] 12:30:40.637 shell.go:HasParentFilePath:697 → stat .git: no such file or directory
[TRACE] 12:30:40.637 shell.go:HasParentFilePath(.git) - 11.58µs
[DEBUG] 12:30:40.637 properties.go:GetBool:22 → fetch_bare_info: false
[DEBUG] 12:30:40.637 properties.go:GetBool:22 → display_cygpath: false
[TRACE] 12:30:40.637 shell.go:GOOS() - 40ns
[TRACE] 12:30:40.637 shell.go:PathSeparator() - 40ns
[TRACE] 12:30:40.637 shell.go:Pwd() - 50ns
[TRACE] 12:30:40.637 shell.go:Shell() - 140ns
[TRACE] 12:30:40.637 shell.go:Shell() - 29ns
[DEBUG] 12:30:40.637 properties.go:GetBool:22 → mapped_locations_enabled: true
[DEBUG] 12:30:40.637 properties.go:GetString:28 → 
[DEBUG] 12:30:40.637 properties.go:GetString:28 → 
[TRACE] 12:30:40.637 shell.go:GOOS() - 20ns
[DEBUG] 12:30:40.637 properties.go:GetString:28 → ~
[DEBUG] 12:30:40.638 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[TRACE] 12:30:40.638 shell.go:GOOS() - 30ns
[TRACE] 12:30:40.638 shell.go:GOOS() - 20ns
[DEBUG] 12:30:40.638 properties.go:GetString:28 → NO DATA
[TRACE] 12:30:40.638 shell.go:Pwd() - 80ns
[TRACE] 12:30:40.638 shell.go:TemplateCache() - 90ns
[TRACE] 12:30:40.638 shell.go:StackCount() - 50ns
[TRACE] 12:30:40.638 shell_unix.go:DirIsWritable(/home/nico) - 2.78µs
[TRACE] 12:30:40.638 shell.go:TemplateCache() - 90ns
[DEBUG] 12:30:40.638 text.go:Render:72 → Rendering template: {{ .Path }}
[TRACE] 12:30:40.638 shell.go:TemplateCache() - 170ns
[DEBUG] 12:30:40.638 text.go:Render:72 → Rendering template: plain
[DEBUG] 12:30:40.638 text.go:Render:72 → Rendering template: plain
[TRACE] 12:30:40.638 shell.go:Shell() - 70ns
[TRACE] 12:30:40.638 shell.go:Shell() - 30ns
[TRACE] 12:30:40.638 shell.go:Shell() - 20ns
[TRACE] 12:30:40.638 shell.go:Shell() - 30ns
[TRACE] 12:30:40.638 shell.go:Flags() - 40ns
[TRACE] 12:30:40.638 shell.go:Pwd() - 60ns
[TRACE] 12:30:40.638 shell.go:GOOS() - 40ns
[DEBUG] 12:30:40.638 segment.go:SetEnabled:560 → Segment: Executiontime
[DEBUG] 12:30:40.638 properties.go:GetBool:22 → always_enabled: false
[TRACE] 12:30:40.638 shell.go:ExecutionTime() - 40ns
[DEBUG] 12:30:40.638 properties.go:GetFloat64:34 → threshold: 5000.000000
[TRACE] 12:30:40.638 shell.go:Shell() - 40ns
[TRACE] 12:30:40.638 shell.go:Shell() - 30ns
[TRACE] 12:30:40.638 shell.go:Shell() - 30ns
[TRACE] 12:30:40.639 shell.go:Shell() - 30ns
[TRACE] 12:30:40.639 shell.go:Flags() - 40ns
[TRACE] 12:30:40.639 shell.go:Pwd() - 50ns
[TRACE] 12:30:40.639 shell.go:GOOS() - 40ns
[DEBUG] 12:30:40.639 segment.go:SetEnabled:560 → Segment: Text
[TRACE] 12:30:40.639 shell.go:TemplateCache() - 50ns
[DEBUG] 12:30:40.639 text.go:Render:72 → Rendering template: ❯
[DEBUG] 12:30:40.639 shell.go:Getenv:326 → NO DATA
[TRACE] 12:30:40.639 shell.go:Getenv(TERM_PROGRAM) - 2.35µs
[TRACE] 12:30:40.639 shell.go:Shell() - 20ns
[DEBUG] 12:30:40.639 text.go:Render:72 → Rendering template: {{if gt .Code 0}}red{{end}}
[TRACE] 12:30:40.639 shell.go:TemplateCache() - 80ns
[DEBUG] 12:30:40.639 text.go:Render:72 → Rendering template: {{if eq .Code 0}}magenta{{end}}
[TRACE] 12:30:40.639 shell.go:TemplateCache() - 80ns
[DEBUG] 12:30:40.639 text.go:Render:72 → Rendering template: plain
[TRACE] 12:30:40.639 shell.go:Shell() - 70ns
[TRACE] 12:30:40.639 shell.go:Shell() - 30ns
[TRACE] 12:30:40.639 shell.go:Flags() - 40ns
[TRACE] 12:30:40.639 shell.go:Shell() - 30ns
[TRACE] 12:30:40.639 shell.go:Shell() - 30ns
[TRACE] 12:30:40.639 shell.go:Flags() - 30ns
[DEBUG] 12:30:40.639 shell.go:Getenv:326 → NO DATA
[TRACE] 12:30:40.639 shell.go:Getenv(OMP_CACHE_DIR) - 2.95µs
[DEBUG] 12:30:40.639 shell.go:Getenv:326 → /home/nico/.cache
[TRACE] 12:30:40.639 shell.go:Getenv(XDG_CACHE_HOME) - 3.22µs
[TRACE] 12:30:40.639 shell_unix.go:CachePath() - 22.82µs
[TRACE] 12:30:40.639 shell.go:Flags() - 40ns
@D3SOX D3SOX added the 🐛 bug Something isn't working label Jul 1, 2024
@D3SOX D3SOX changed the title Incompatibility with zsh-autosuggestions Incompatibility with zsh-autocomplete Jul 1, 2024
@JanDeDobbeleer
Copy link
Owner

@D3SOX does this also happen without a transient prompt in your config (and restart the shell). Keyhandlers can influence this.

@D3SOX
Copy link
Author

D3SOX commented Jul 1, 2024

You are correct, commenting out the transient prompt part makes it work again.
Is there anything that you can do that makes both work at the same time?

@D3SOX D3SOX changed the title Incompatibility with zsh-autocomplete Incompatibility with zsh-autocomplete and a transient prompt Jul 1, 2024
@ahmedwael216
Copy link

I can confirm this bug also appeared on my machine after enabling transient prompt.

@JanDeDobbeleer
Copy link
Owner

@D3SOX i'll have a look, but it might as well be that we're both overriding the same function here. The internals of zsh on this front aren't well documented either I'm afraid.

@LiberaTeMetuMortis
Copy link

It just works fine for me

@D3SOX
Copy link
Author

D3SOX commented Jul 3, 2024

@LiberaTeMetuMortis Can you post your config files for reference

@LiberaTeMetuMortis
Copy link

# yaml-language-server: $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
  segments:
  - type: session
    style: diamond
    foreground: p:black
    background: "#9370db"
    leading_diamond: 
    trailing_diamond: 
    template: " {{ if .SSHSession }}\ueba9 {{ end }}{{ .UserName }} "
  - type: path
    style: powerline
    powerline_symbol: 
    foreground: p:white
    background: "#9932cc"
    template: " \uea83 {{ path .Path .Location }} "
    properties:
      style: folder
  - type: git
    style: powerline
    powerline_symbol: 
    foreground: p:black
    foreground_templates:
    - "{{ if or (.Working.Changed) (.Staging.Changed) }}p:black{{ end }}"
    - "{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:white{{ end }}"
    - "{{ if gt .Ahead 0 }}p:white{{ end }}"
    background: p:green
    background_templates:
    - "{{ if or (.Working.Changed) (.Staging.Changed) }}p:yellow{{ end }}"
    - "{{ if and (gt .Ahead 0) (gt .Behind 0) }}p:red{{ end }}"
    - "{{ if gt .Ahead 0 }}#49416D{{ end }}"
    - "{{ if gt .Behind 0 }}#7A306C{{ end }}"
    template: " {{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }} {{ end }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} "
    properties:
      branch_max_length: 25
      fetch_status: true
      fetch_upstream_icon: true
  - type: root
    style: powerline
    powerline_symbol: 
    foreground: p:white
    background: p:yellow
    template: " \uf0e7 "
  - type: status
    style: diamond
    foreground: p:white
    background: p:blue
    background_templates:
    - "{{ if gt .Code 0 }}p:red{{ end }}"
    leading_diamond: <transparent,background></>
    trailing_diamond: 
    template: " {{ if gt .Code 0 }}\uf00d{{ else }}\uf00c{{ end }} "
    properties:
      always_enabled: true
- type: rprompt
  segments:
  - type: node
    style: plain
    foreground: p:green
    background: transparent
    template: "\ue718 "
    properties:
      display_mode: files
      fetch_package_manager: false
      home_enabled: false
  - type: go
    style: plain
    foreground: p:blue
    background: transparent
    template: "\ue626 "
    properties:
      fetch_version: false
  - type: python
    style: plain
    foreground: p:yellow
    background: transparent
    template: "\ue235 "
    properties:
      display_mode: files
      fetch_version: false
      fetch_virtual_env: false
  - type: shell
    style: plain
    foreground: p:white
    background: transparent
    template: "in <p:blue><b>{{ .Name }}</b></> "
  - type: time
    style: plain
    foreground: p:white
    background: transparent
    template: at <p:blue><b>{{ .CurrentDate | date "15:04:05" }}</b></>
transient_prompt:
  foreground: p:black
  background: transparent
  template: "<p:purple>\ue0b6</><,p:purple> {{ .UserName }} </><p:purple,transparent>\ue0b0</> "
secondary_prompt:
  foreground: p:black
  background: transparent
  template: "<p:yellow,transparent>\ue0b6</><,p:yellow> > </><p:yellow,transparent>\ue0b0</> "
palette:
  black: "#262B44"
  blue: "#4B95E9"
  green: "#59C9A5"
  orange: "#F07623"
  red: "#D81E5B"
  white: "#E0DEF4"
  yellow: "#F3AE35"
  purple: "#9370db"

@D3SOX

po1o added a commit to po1o/oh-my-posh that referenced this issue Jul 6, 2024
Posh redefines zle-line-init instead of decorating it. This makes
some other zsh plugins fail if they also rely on redefining it.
This commit adds a helper function to decorate any user-defined widget
and use it to decorate zle-line-init.

The logic in this commit is largely inspired by how the zsh-highligting
plugin does the widget wrapping.
po1o added a commit to po1o/oh-my-posh that referenced this issue Jul 6, 2024
Posh redefines zle-line-init instead of decorating it. This makes
some other zsh plugins fail if they also rely on redefining it.
This commit adds a helper function to decorate any user-defined widget
and use it to decorate zle-line-init.

The logic in this commit is largely inspired by how the zsh-highligting
plugin does the widget wrapping.
po1o added a commit to po1o/oh-my-posh that referenced this issue Jul 6, 2024
Posh redefines zle-line-init instead of decorating it. This makes
some other zsh plugins fail if they also rely on redefining it.
This commit adds a helper function to decorate any user-defined widget
and use it to decorate zle-line-init.

The logic in this commit is largely inspired by how the zsh-highligting
plugin does the widget wrapping.

This fixes issue JanDeDobbeleer#5193.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants