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

edit commands either hang or exit with status 1 after a long pause #6019

Closed
1 task done
heaths opened this issue Dec 15, 2024 · 2 comments · Fixed by #6040
Closed
1 task done

edit commands either hang or exit with status 1 after a long pause #6019

heaths opened this issue Dec 15, 2024 · 2 comments · Fixed by #6040
Assignees
Labels
🐛 bug Something isn't working

Comments

@heaths
Copy link
Contributor

heaths commented Dec 15, 2024

Code of Conduct

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

What happened?

In the course of working on #6014 I tried the oh-my-posh cache edit command and when my $EDITOR is hx, the command hangs and I have to kill hx from another term. I tried setting $EDITOR to something else e.g., vim and after a second or two, oh-my-posh exits with status code 1.

Theme

theme.omp.yml
# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
version: 3
console_title_template: >-
  {{ $pwd := .PWD -}}
  {{ .Shell }} in {{ with $repo := .Segments.Git -}}
    {{ if (gt (sub (len $pwd) (len $repo.Dir)) 20) -}}
      git:{{ $repo.RepoName }}/…/{{ base $pwd }}
    {{- else -}}
      git:{{ $repo.RepoName }}{{ trimPrefix $repo.Dir $pwd}}
    {{- end }}
  {{- else -}}
    {{ .Folder }}
  {{- end }}
final_space: true
shell_integration: true

palette:
  # https://colorkit.co/palette/02944e-4f0193-f1c516-eb850d-e44403-05a3e2-f7f6f5-7c7b7b-464646-101010/
  green: "#02944e"
  purple: "#4f0193"
  darkPurple: "#940248" # not in palette
  yellow: "#f1c516"
  orange: "#eb850d"
  red: "#e44403"
  blue: "#05a3e2"
  white: "#f7f6f5"
  gray: "#7c7b7b"
  darkGray: "#464646"
  black: "#101010"

blocks:
- type: prompt
  alignment: left
  segments:
  - type: shell
    style: diamond
    foreground: p:white
    background: p:purple
    properties:
      mapped_shell_names:
        powershell: PS
        pwsh: PS

  - type: python
    style: powerline
    powerline_symbol: ""
    foreground: p:white
    background: p:darkPurple
    template: "  {{ if .Error }}{{ .Error }}{{ else }}{{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }} "

  - type: executiontime
    style: powerline
    powerline_symbol: ""
    foreground: p:black
    background: p:orange
    properties:
      style: austin

  - type: status
    style: powerline
    powerline_symbol: ""
    foreground: p:white
    background: p:blue
    background_templates:
    - "{{ if gt .Code 0 }}p:red{{ end }}"
    properties:
      always_enable: true

  - type: session
    style: powerline
    powerline_symbol: ""
    foreground: p:white
    background: p:blue
    template: " {{ if .SSHSession }} {{ end }}{{ .UserName }} "

  - type: root
    style: powerline
    powerline_symbol: ""
    foreground: p:white
    background: p:red
    template: ""

  - type: path
    style: powerline
    powerline_symbol: ""
    foreground: p:black
    background: p:gray
    template: ' {{ path .Path .Location }} {{ repeat .StackCount "" }}'
    properties:
      style: full

- type: prompt
  alignment: left
  newline: true
  segments:
  - type: git
    cache:
      duration: 5s
      strategy: folder
    style: diamond
    trailing_diamond: ""
    foreground: p:white
    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:black{{ 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 }}p:yellow{{ end }}"
    - "{{ if gt .Behind 0 }}p:orange{{ end }}"
    template: " {{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }}{{ end }}{{
      .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed
      }}  {{ .Working.String }}{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String
      }}{{ end }} "
    properties:
      branch_icon: ""
      fetch_status: true

debug_prompt:
  background: transparent
  template: "<p:white,p:red>  DBG </><p:red,transparent></> "

secondary_prompt:
  background: transparent
  template: "<p:black,p:gray> </><p:gray,transparent></> "

# vim: set et sw=2:

What OS are you seeing the problem on?

macOS

Which shell are you using?

bash

Log output

Version: 24.13.0

Shell: bash (5.2.37(1)-release)

Prompt:

�]133;D;0��]133;A� bash  heaths  �]8;;file:�\~/src/oh-my-posh-actual/src�]8;;\ 
  issue6012 ≡  �]133;B�

Segments:

ConsoleTitle(true)                         -   0 ms
Shell(true)                                -   0 ms
Python(false)                              -   2 ms
Executiontime(false)                       -   1 ms
Status(false)                              -   1 ms
Session(true)                              -   3 ms
Root(false)                                -   0 ms
Path(true)                                 -   1 ms
Git(true)                                  - 134 ms

Run duration: 154.485958ms

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

Config path: /Users/heaths/.config/oh-my-posh/theme.omp.yml

Logs:

�[38;2;191;207;240m[DEBUG] �[38;2;156;231;201m07:42:45.471 �[0mcommand.go:execute:989�[38;2;156;231;201m →�[0m debug mode enabled
�[38;2;191;207;240m[DEBUG] �[38;2;156;231;201m07:42:45.472 �[0mdebug.go:40�[38;2;156;231;201m →�[0m config set using POSH_THEME: /Users/heaths/.config/oh-my-posh/theme.omp.yml
�[38;2;204;137;214m[TRACE] �[38;2;156;231;201m07:42:45.472 �[0mdebug.go() - �[38;2;156;231;201m167.833µs�[0m
�[38;2;204;137;214m[TRACE] �[38;2;156;231;201m07:42:45.474 �[0mload.go:Load() - �[38;2;156;231;201m2.230375ms�[0m
�[38;2;204;137;214m[TRACE] �[38;2;156;231;201m07:42:45.474 �[0mdebug.go() - �[38;2;156;231;201m2.405375ms�[0m
[DEBUG] 07:42:45.475 debug.go:52 → plain mode enabled
[DEBUG] 07:42:45.475 home.go:Home:16 → /Users/heaths
[TRACE] 07:42:45.475 terminal.go() - 29.75µs
[DEBUG] 07:42:45.475 terminal.go:59 → loading cache file: /Users/heaths/.cache/oh-my-posh/omp.cache
[DEBUG] 07:42:45.476 terminal.go:59 → loading cache key: environment_platform
[DEBUG] 07:42:45.476 terminal.go:59 → loading cache key: is_wsl
[TRACE] 07:42:45.476 terminal.go(/Users/heaths/.cache/oh-my-posh/omp.cache) - 530.25µs
[DEBUG] 07:42:45.476 home.go:Home:16 → /Users/heaths
[TRACE] 07:42:45.476 terminal.go() - 6.625µs
[DEBUG] 07:42:45.476 terminal.go:59 → loading cache file: /Users/heaths/.cache/oh-my-posh/omp.cache.8766eedd-7f76-4a80-9dde-58b0441a62cb
[DEBUG] 07:42:45.476 terminal.go:59 → loading cache key: prompt_count_cache
[DEBUG] 07:42:45.476 terminal.go:59 → loading cache key: template_cache
[TRACE] 07:42:45.476 terminal.go(/Users/heaths/.cache/oh-my-posh/omp.cache.8766eedd-7f76-4a80-9dde-58b0441a62cb) - 367.292µs
[TRACE] 07:42:45.476 terminal.go:Init() - 333ns
[TRACE] 07:42:45.476 terminal.go() - 41ns
[DEBUG] 07:42:45.476 terminal.go:Init:67 → /Users/heaths/src/oh-my-posh-actual/src
[TRACE] 07:42:45.476 terminal.go:Init() - 6.166µs
[TRACE] 07:42:45.476 debug.go() - 1.626834ms
[TRACE] 07:42:45.476 init.go:Init() - 0s
[TRACE] 07:42:45.476 cache.go:loadCache() - 0s
[TRACE] 07:42:45.476 cache.go:loadCache() - 51.792µs
[DEBUG] 07:42:45.476 debug.go:61 → terminal program: iTerm.app
[DEBUG] 07:42:45.476 debug.go:61 → terminal shell: shell
[DEBUG] 07:42:45.477 config.go:MakeColors:58 → NO DATA
[TRACE] 07:42:45.477 config.go:MakeColors(OMP_CACHE_DISABLED) - 141.5µs
[ERROR] 07:42:45.484 colors_darwin.go:GetAccentColor:12 → exit status 1
[DEBUG] 07:42:45.484 colors_darwin.go:GetAccentColor:12 ↓
    2024-12-15 07:42:45.483 defaults[16761:1625948] 
    The domain/default pair of (kCFPreferencesAnyApplication, AppleAccentColor) does not exist
    
[TRACE] 07:42:45.484 colors_darwin.go:GetAccentColor(defaults read -g AppleAccentColor) - 7.144708ms
[ERROR] 07:42:45.484 colors.go:SetAccentColor:178 → exit status 1
[TRACE] 07:42:45.484 colors.go:MakeColors() - 7.150666ms
[TRACE] 07:42:45.484 debug.go:PrintDebug() - 83ns
[DEBUG] 07:42:45.484 debug.go:PrintDebug:16 → 5.2.37(1)-release
[TRACE] 07:42:45.484 debug.go:PrintDebug(POSH_SHELL_VERSION) - 2.75µs
[DEBUG] 07:42:45.484 debug.go:72 → segment: Title
[TRACE] 07:42:45.485 engine.go:getTitleTemplateText({{ $pwd := .PWD -}} {{ .Shell }} in {{ with $repo := .Segments.Git -}}   {{ if (gt (sub (len $pwd) (len $repo.Dir)) 20) -}}     git:{{ $repo.RepoName }}/…/{{ base $pwd }}   {{- else -}}     git:{{ $repo.RepoName }}{{ trimPrefix $repo.Dir $pwd}}   {{- end }} {{- else -}}   {{ .Folder }} {{- end }}) - 971µs
[TRACE] 07:42:45.485 primary.go:needsPrimaryRightPrompt() - 42ns
[TRACE] 07:42:45.485 primary.go:writePrimaryPrompt() - 42ns
[TRACE] 07:42:45.485 primary.go:writePrimaryPrompt() - 0s
[DEBUG] 07:42:45.485 terminal.go:CursorPosition:583 → NO DATA
[TRACE] 07:42:45.485 terminal.go:CursorPosition(POSH_CURSOR_LINE) - 2.042µs
[DEBUG] 07:42:45.485 terminal.go:CursorPosition:587 → NO DATA
[TRACE] 07:42:45.485 terminal.go:CursorPosition(POSH_CURSOR_COLUMN) - 1µs
[TRACE] 07:42:45.485 primary.go:writePrimaryPrompt() - 0s
[TRACE] 07:42:45.485 primary.go:writePrimaryPrompt() - 41ns
[TRACE] 07:42:45.485 segment.go:Execute() - 42ns
[TRACE] 07:42:45.485 segment.go:Execute() - 84ns
[DEBUG] 07:42:45.485 home.go:Home:16 → /Users/heaths
[DEBUG] 07:42:45.485 home.go:Home:16 → /Users/heaths
[DEBUG] 07:42:45.485 home.go:Home:16 → /Users/heaths
[TRACE] 07:42:45.485 terminal.go:DirMatchesOneOf() - 42ns
[TRACE] 07:42:45.485 terminal.go:DirMatchesOneOf() - 42ns
[TRACE] 07:42:45.485 terminal.go:DirMatchesOneOf() - 0s
[DEBUG] 07:42:45.485 segment.go:Execute:110 → segment: Path
[DEBUG] 07:42:45.485 segment.go:Execute:110 → segment: Shell
[DEBUG] 07:42:45.485 segment.go:Execute:110 → segment: Executiontime
[DEBUG] 07:42:45.485 segment.go:Execute:112 → no toggles found
[DEBUG] 07:42:45.485 segment.go:Execute:112 → no toggles found
[TRACE] 07:42:45.485 segment.go:Execute() - 375ns
[DEBUG] 07:42:45.485 home.go:Home:16 → /Users/heaths
[TRACE] 07:42:45.485 segment.go:Execute() - 42ns
[TRACE] 07:42:45.485 terminal.go:DirMatchesOneOf() - 42ns
[DEBUG] 07:42:45.485 segment.go:Execute:110 → segment: Python
[DEBUG] 07:42:45.485 segment.go:Execute:112 → no toggles found
[TRACE] 07:42:45.485 segment.go:Execute() - 41ns
[DEBUG] 07:42:45.485 home.go:Home:16 → /Users/heaths
[TRACE] 07:42:45.485 terminal.go:DirMatchesOneOf() - 41ns
[DEBUG] 07:42:45.485 segment.go:Execute:110 → segment: Root
[DEBUG] 07:42:45.485 home.go:Home:16 → /Users/heaths
[TRACE] 07:42:45.485 terminal.go:DirMatchesOneOf() - 42ns
[DEBUG] 07:42:45.485 segment.go:Execute:110 → segment: Session
[DEBUG] 07:42:45.485 segment.go:Execute:112 → no toggles found
[TRACE] 07:42:45.485 segment.go:Execute() - 42ns
[DEBUG] 07:42:45.485 home.go:Home:16 → /Users/heaths
[TRACE] 07:42:45.485 terminal.go:DirMatchesOneOf() - 41ns
[DEBUG] 07:42:45.485 segment.go:Execute:110 → segment: Status
[DEBUG] 07:42:45.485 segment.go:Execute:112 → no toggles found
[TRACE] 07:42:45.485 root.go:Enabled() - 541ns
[DEBUG] 07:42:45.485 session.go:activeSSHSession:31 → NO DATA
[TRACE] 07:42:45.485 session.go:activeSSHSession(SSH_CONNECTION) - 71.25µs
[DEBUG] 07:42:45.485 session.go:activeSSHSession:31 → NO DATA
[TRACE] 07:42:45.485 session.go:activeSSHSession(SSH_CLIENT) - 1.041µs
[DEBUG] 07:42:45.485 session.go:activeSSHSession:37 → darwin
[TRACE] 07:42:45.485 status.go:Enabled() - 125ns
[DEBUG] 07:42:45.485 status.go:formatStatus:45 → {{ .Code }}
[DEBUG] 07:42:45.485 shell.go:Enabled:26 → mapped_shell_names: map[powershell:PS pwsh:PS]
[TRACE] 07:42:45.485 shell.go:Enabled() - 42ns
[TRACE] 07:42:45.485 shell.go:Enabled() - 0s
[TRACE] 07:42:45.486 segment.go:string( {{ .Name }} ) - 130.791µs
[TRACE] 07:42:45.486 segment.go:resolve(diamond) - 83ns
[DEBUG] 07:42:45.486 python.go:Enabled:57 → environment
[DEBUG] 07:42:45.486 path.go:147 → display_cygpath: false
[DEBUG] 07:42:45.486 executiontime.go:Enabled:55 → always_enabled: false
[TRACE] 07:42:45.486 executiontime.go:Enabled() - 1.5µs
[TRACE] 07:42:45.486 path.go:setPaths() - 0s
[TRACE] 07:42:45.486 path.go:setPaths() - 84ns
[TRACE] 07:42:45.486 path.go:setPaths() - 0s
[DEBUG] 07:42:45.486 executiontime.go:Enabled:57 → threshold: 500.000000
[DEBUG] 07:42:45.486 language.go:Enabled:118 → extensions: [*.py *.ipynb pyproject.toml venv.bak]
[DEBUG] 07:42:45.486 language.go:Enabled:119 → folders: [.venv venv virtualenv venv-win pyenv-win]
[DEBUG] 07:42:45.486 language.go:Enabled:126 → home_enabled: false
[DEBUG] 07:42:45.486 home.go:Home:16 → /Users/heaths
[DEBUG] 07:42:45.486 python.go:loadContext:65 → fetch_virtual_env: true
[TRACE] 07:42:45.486 path.go:parsePath() - 42ns
[DEBUG] 07:42:45.486 path.go:setMappedLocations:557 → mapped_locations_enabled: true
[DEBUG] 07:42:45.486 path.go:setMappedLocations:558 → 
[DEBUG] 07:42:45.486 path.go:setMappedLocations:559 → 
[DEBUG] 07:42:45.486 home.go:Home:16 → /Users/heaths
[TRACE] 07:42:45.486 clean.go:Clean() - 42ns
[ERROR] 07:42:45.486 python.go:pyvenvCfgPrompt:179 → exec: "python": executable file not found in $PATH
[TRACE] 07:42:45.486 python.go:pyvenvCfgPrompt(python) - 68.125µs
[TRACE] 07:42:45.486 path.go:normalize() - 42ns
[TRACE] 07:42:45.486 path.go:normalize() - 0s
[DEBUG] 07:42:45.486 path.go:setMappedLocations:560 → ~
[DEBUG] 07:42:45.486 path.go:setMappedLocations:565 → mapped_locations: map[]
[TRACE] 07:42:45.486 clean.go:Clean() - 41ns
[TRACE] 07:42:45.486 path.go:normalize() - 42ns
[TRACE] 07:42:45.486 path.go:normalize() - 0s
[TRACE] 07:42:45.486 clean.go:Clean() - 41ns
[TRACE] 07:42:45.486 path.go:normalize() - 42ns
[TRACE] 07:42:45.486 path.go:normalize() - 42ns
[TRACE] 07:42:45.486 path.go:parsePath() - 0s
[TRACE] 07:42:45.486 path.go:parsePath() - 42ns
[TRACE] 07:42:45.486 path.go:parsePath() - 0s
[DEBUG] 07:42:45.486 path.go:makeFolderFormatMap:833 → NO DATA
[DEBUG] 07:42:45.486 path.go:setStyle:213 → full
[DEBUG] 07:42:45.486 path.go:colorizePath:734 → cycle: []
[DEBUG] 07:42:45.486 path.go:getFolderSeparator:267 → NO DATA
[DEBUG] 07:42:45.486 path.go:getFolderSeparator:269 → /
[DEBUG] 07:42:45.486 path.go:colorizePath:737 → cycle_folder_separator: false
[DEBUG] 07:42:45.486 path.go:colorizePath:738 → %s
[DEBUG] 07:42:45.486 path.go:colorizePath:740 → %s
[DEBUG] 07:42:45.486 path.go:colorizePath:741 → %s
[DEBUG] 07:42:45.486 path.go:colorizePath:742 → %s
[TRACE] 07:42:45.486 path.go:Enabled() - 0s
[TRACE] 07:42:45.486 path.go:Enabled() - 0s
[TRACE] 07:42:45.486 path.go:Enabled() - 42ns
[TRACE] 07:42:45.486 path.go:Enabled(/Users/heaths/src/oh-my-posh-actual/src) - 18.792µs
[TRACE] 07:42:45.486 status.go:formatStatus({{ .Code }}) - 934.541µs
[DEBUG] 07:42:45.486 status.go:Enabled:37 → always_enabled: false
[DEBUG] 07:42:45.486 python.go:pyvenvCfgPrompt:181 → /usr/bin/python3
[TRACE] 07:42:45.486 python.go:pyvenvCfgPrompt(python3) - 346.25µs
[DEBUG] 07:42:45.487 python.go:pyvenvCfgPrompt:189 → false
[TRACE] 07:42:45.487 python.go:pyvenvCfgPrompt(pyvenv.cfg) - 834.125µs
[DEBUG] 07:42:45.487 python.go:pyvenvCfgPrompt:193 → false
[TRACE] 07:42:45.487 python.go:pyvenvCfgPrompt(pyvenv.cfg) - 91.333µs
[DEBUG] 07:42:45.487 python.go:loadContext:79 → folder_name_fallback: true
[DEBUG] 07:42:45.487 python.go:loadContext:80 → default_venv_names: [.venv venv]
[DEBUG] 07:42:45.487 python.go:loadContext:87 → NO DATA
[TRACE] 07:42:45.487 python.go:loadContext(VIRTUAL_ENV) - 1.333µs
[DEBUG] 07:42:45.487 python.go:loadContext:87 → NO DATA
[TRACE] 07:42:45.487 python.go:loadContext(CONDA_ENV_PATH) - 1.084µs
[DEBUG] 07:42:45.487 python.go:loadContext:87 → NO DATA
[TRACE] 07:42:45.487 python.go:loadContext(CONDA_DEFAULT_ENV) - 1.167µs
[TRACE] 07:42:45.487 segment.go:resolve(powerline) - 125ns
[TRACE] 07:42:45.487 segment.go:resolve(powerline) - 42ns
[TRACE] 07:42:45.487 segment.go:resolve(powerline) - 0s
[DEBUG] 07:42:45.489 session.go:activeSSHSession:41 → heaths                        Dec 15 07:42
[TRACE] 07:42:45.489 session.go:activeSSHSession(who am i) - 3.500292ms
[TRACE] 07:42:45.489 segment.go:string( {{ if .SSHSession }} {{ end }}{{ .UserName }} ) - 20.041µs
[TRACE] 07:42:45.489 segment.go:resolve(powerline) - 167ns
[TRACE] 07:42:45.489 segment.go:resolve(powerline) - 41ns
[TRACE] 07:42:45.489 segment.go:string( {{ path .Path .Location }} {{ repeat .StackCount "" }}) - 25.166µs
[TRACE] 07:42:45.489 segment.go:resolve(powerline) - 42ns
[TRACE] 07:42:45.489 engine.go:applyPowerShellBleedPatch() - 41ns
[TRACE] 07:42:45.489 engine.go:applyPowerShellBleedPatch() - 42ns
[TRACE] 07:42:45.489 segment.go:Execute() - 42ns
[DEBUG] 07:42:45.489 home.go:Home:16 → /Users/heaths
[TRACE] 07:42:45.489 terminal.go:DirMatchesOneOf() - 42ns
[DEBUG] 07:42:45.489 segment.go:Execute:110 → segment: Git
[DEBUG] 07:42:45.489 segment.go:Execute:112 → no toggles found
[DEBUG] 07:42:45.489 terminal.go:HasParentFilePath:446 → /Users/heaths/src/oh-my-posh-actual/src
[TRACE] 07:42:45.489 terminal.go:HasParentFilePath(/Users/heaths/src/oh-my-posh-actual/src) - 172.958µs
[TRACE] 07:42:45.489 git.go:CacheKey(.git) - 180.833µs
[DEBUG] 07:42:45.489 segment.go:Execute:116 → no cache found for segment:  Git
[DEBUG] 07:42:45.489 terminal_unix.go:IsWsl2:49 → false
[TRACE] 07:42:45.489 terminal_unix.go:IsWsl2() - 2.167µs
[TRACE] 07:42:45.489 terminal_unix.go:InWSLSharedDrive() - 3.416µs
[TRACE] 07:42:45.489 scm.go:hasCommand() - 0s
[DEBUG] 07:42:45.489 terminal.go:HasCommand:323 → /usr/bin/git
[TRACE] 07:42:45.489 terminal.go:HasCommand(git) - 35.917µs
[TRACE] 07:42:45.489 scm.go:hasCommand(git) - 37.125µs
[DEBUG] 07:42:45.489 git.go:shouldDisplay:328 → fetch_bare_info: false
[DEBUG] 07:42:45.489 terminal.go:HasParentFilePath:446 → /Users/heaths/src/oh-my-posh-actual/src
[TRACE] 07:42:45.489 terminal.go:HasParentFilePath(/Users/heaths/src/oh-my-posh-actual/src) - 6.834µs
[TRACE] 07:42:45.489 git.go:shouldDisplay(.git) - 10.291µs
[DEBUG] 07:42:45.489 home.go:Home:16 → /Users/heaths
[TRACE] 07:42:45.489 git.go:setDir() - 0s
[TRACE] 07:42:45.489 scm.go:convertToWindowsPath() - 0s
[DEBUG] 07:42:45.489 git.go:Enabled:174 → fetch_user: false
[DEBUG] 07:42:45.489 git.go:Enabled:189 → cli
[DEBUG] 07:42:45.489 git.go:Enabled:194 → fetch_status: true
[DEBUG] 07:42:45.489 git.go:shouldIgnoreStatus:466 → ignore_status: []
[DEBUG] 07:42:45.489 home.go:Home:16 → /Users/heaths
[TRACE] 07:42:45.489 terminal.go:DirMatchesOneOf() - 41ns
[DEBUG] 07:42:45.489 git.go:setGitStatus:612 → status_formats: map[]
[DEBUG] 07:42:45.489 git.go:getSwitchMode:911 → untracked_modes: map[]
[DEBUG] 07:42:45.489 git.go:getSwitchMode:911 → ignore_submodules: map[]
[DEBUG] 07:42:45.623 git.go:getGitCommandOutput:663 ↓
    # branch.oid 157c3c452d94c0591c7935ea6f22bda475b88c89
    # branch.head issue6012
    # branch.upstream origin/issue6012
    # branch.ab +0 -0
[TRACE] 07:42:45.623 git.go:getGitCommandOutput(git -C /Users/heaths/src/oh-my-posh-actual --no-optional-locks -c core.quotepath=false -c color.status=false status -unormal --branch --porcelain=2) - 133.825584ms
[DEBUG] 07:42:45.623 git.go:setGitHEADContext:671 →  
[DEBUG] 07:42:45.623 scm.go:formatBranch:106 → mapped_branches: map[]
[DEBUG] 07:42:45.623 scm.go:formatBranch:122 → full_branch_path: true
[DEBUG] 07:42:45.623 scm.go:formatBranch:128 → branch_max_length: 0
[DEBUG] 07:42:45.623 git.go:setGitHEADContext:699 → false
[TRACE] 07:42:45.623 git.go:setGitHEADContext(/Users/heaths/src/oh-my-posh-actual/.git/rebase-merge) - 10.792µs
[DEBUG] 07:42:45.623 git.go:setGitHEADContext:711 → false
[TRACE] 07:42:45.623 git.go:setGitHEADContext(/Users/heaths/src/oh-my-posh-actual/.git/rebase-apply) - 2.333µs
[DEBUG] 07:42:45.623 git.go:setGitHEADContext:722 → 
[DEBUG] 07:42:45.623 git.go:hasGitFile:801 → false
[TRACE] 07:42:45.623 git.go:hasGitFile(MERGE_MSG) - 93.5µs
[DEBUG] 07:42:45.623 git.go:hasGitFile:801 → false
[TRACE] 07:42:45.623 git.go:hasGitFile(CHERRY_PICK_HEAD) - 3.167µs
[DEBUG] 07:42:45.623 git.go:hasGitFile:801 → false
[TRACE] 07:42:45.623 git.go:hasGitFile(REVERT_HEAD) - 2.875µs
[DEBUG] 07:42:45.623 git.go:hasGitFile:801 → false
[TRACE] 07:42:45.623 git.go:hasGitFile(sequencer/todo) - 2.542µs
[DEBUG] 07:42:45.623 git.go:485 → ≡
[DEBUG] 07:42:45.623 git.go:Enabled:207 → fetch_upstream_icon: false
[TRACE] 07:42:45.623 segment.go:string( {{ if .UpstreamURL }}{{ url .UpstreamIcon .UpstreamURL }}{{ end }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}  {{ .Working.String }}{{ end }}{{ if .Staging.Changed }}  {{ .Staging.String }}{{ end }} ) - 77.291µs
[DEBUG] 07:42:45.624 terminal.go:HasParentFilePath:446 → /Users/heaths/src/oh-my-posh-actual/src
[TRACE] 07:42:45.624 terminal.go:HasParentFilePath(/Users/heaths/src/oh-my-posh-actual/src) - 15.625µs
[TRACE] 07:42:45.624 git.go:CacheKey(.git) - 23.583µs
[TRACE] 07:42:45.624 list.go:FirstMatch({{ if or (.Working.Changed) (.Staging.Changed) }}p:yellow{{ end }}) - 20.084µs
[TRACE] 07:42:45.624 list.go:FirstMatch({{ if and (gt .Ahead 0) (gt .Behind 0) }}p:red{{ end }}) - 13.667µs
[TRACE] 07:42:45.624 list.go:FirstMatch({{ if gt .Ahead 0 }}p:yellow{{ end }}) - 10.375µs
[TRACE] 07:42:45.624 list.go:FirstMatch({{ if gt .Behind 0 }}p:orange{{ end }}) - 7.083µs
[TRACE] 07:42:45.624 list.go:FirstMatch({{ if or (.Working.Changed) (.Staging.Changed) }}p:black{{ end }}) - 10.292µs
[TRACE] 07:42:45.624 list.go:FirstMatch({{ if and (gt .Ahead 0) (gt .Behind 0) }}p:white{{ end }}) - 224.792µs
[TRACE] 07:42:45.624 list.go:FirstMatch({{ if gt .Ahead 0 }}p:black{{ end }}) - 23.041µs
[TRACE] 07:42:45.624 segment.go:resolve(diamond) - 83ns
[TRACE] 07:42:45.624 list.go:FirstMatch({{ if or (.Working.Changed) (.Staging.Changed) }}p:yellow{{ end }}) - 20.834µs
[TRACE] 07:42:45.624 list.go:FirstMatch({{ if and (gt .Ahead 0) (gt .Behind 0) }}p:red{{ end }}) - 14.084µs
[TRACE] 07:42:45.624 list.go:FirstMatch({{ if gt .Ahead 0 }}p:yellow{{ end }}) - 112µs
[TRACE] 07:42:45.624 list.go:FirstMatch({{ if gt .Behind 0 }}p:orange{{ end }}) - 11.375µs
[TRACE] 07:42:45.624 list.go:FirstMatch({{ if or (.Working.Changed) (.Staging.Changed) }}p:black{{ end }}) - 14.625µs
[TRACE] 07:42:45.624 list.go:FirstMatch({{ if and (gt .Ahead 0) (gt .Behind 0) }}p:white{{ end }}) - 10.333µs
[TRACE] 07:42:45.624 list.go:FirstMatch({{ if gt .Ahead 0 }}p:black{{ end }}) - 6.958µs
[TRACE] 07:42:45.624 engine.go:applyPowerShellBleedPatch() - 167ns
[TRACE] 07:42:45.624 engine.go:applyPowerShellBleedPatch() - 42ns
[TRACE] 07:42:45.624 primary.go:writePrimaryPrompt() - 0s
[TRACE] 07:42:45.624 primary.go:Primary() - 0s
[DEBUG] 07:42:45.624 home.go:Home:16 → /Users/heaths
[TRACE] 07:42:45.624 debug.go:PrintDebug() - 10.209µs
[TRACE] 07:42:45.624 debug.go:PrintDebug() - 0s
@heaths heaths added the 🐛 bug Something isn't working label Dec 15, 2024
@JanDeDobbeleer
Copy link
Owner

@heaths I can't reproduce this with EDITOR set to code --wait, are you certain this isn't due to how you set the variable?

@heaths
Copy link
Contributor Author

heaths commented Dec 19, 2024

I can repro this on both my Mac and Windows/WSL using either vim or hx - both terminal apps. code launches a window but returns control, which is maybe why that works. Perhaps you're capturing stdout? I haven't delved into the source yet but happy to take a look.

EDITOR=hx oh-my-posh config edit
export EDITOR=hx
oh-my-posh config edit

Other CLIs e.g., the GitHub CLI gh work just fine with terminal editors.

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

Successfully merging a pull request may close this issue.

2 participants