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

part of transparent and wrong color bleeding in when using any text type besides 'plain' #6101

Open
1 task done
IAMSolaara opened this issue Jan 17, 2025 · 1 comment
Open
1 task done
Assignees
Labels
🐛 bug Something isn't working

Comments

@IAMSolaara
Copy link

Code of Conduct

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

What happened?

I tried using the powershell style in my path segment and it has this weird thing that I never set in it:

Image

I configure ohmyposh from my env.nu:

let ohmyposh_init_script = ($nu.vendor-autoload-dirs | last | path join "oh-my-posh-init.nu" )
oh-my-posh init nu --config ($env.HOME | path join dotfiles | path join "oh-my-posh" | path join "so-shell.omp.yaml") --print | save $ohmyposh_init_script --force

which automatically gets loaded by nushell.
I have tried upgrading, removing that file and letting nu generate a fresh one, but no dice.

I'm on nushell version 0.101.0 but I also saw this in 0.100.0.

Theme

I'm making my own: (the garbled character is nf-oct-dot_fill from NerdFont)

# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
version: 3
console_title_template: "{{.UserName}} in {{.PWD}}"
final_space: true
palette:
  foreground: "#FFF1A4"
  lavender: "#B7BDF8"
blocks:
  - type: prompt
    alignment: left
    segments:
      - type: path
        style: powerline
        powerline_symbol: ""
        foreground: p:foreground
        template: "{{ .Path }}"
        properties:
          home_icon: ""
          style: powerlevel
          mixed_threshold: 8
          max_depth: 3
      - type: text
        style: plain
        template: ""
        foreground_templates:
          - "{{if .Root}}p:red{{end}}"

What OS are you seeing the problem on?

macOS

Which shell are you using?

nu

Log output

Version: 24.18.1

Shell: nu (0.101.0)

Prompt:

⌂/d/oh-my-posh  

Segments:

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

Run duration: 11.835ms

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

Config path: /Users/evermore/dotfiles/oh-my-posh/so-shell.omp.yaml

Logs:

�[38;2;191;207;240m[DEBUG] �[38;2;156;231;201m10:50:36.709 �[0mcommand.go:execute:989�[38;2;156;231;201m →�[0m debug mode enabled
�[38;2;191;207;240m[DEBUG] �[38;2;156;231;201m10:50:36.709 �[0mdebug.go:40�[38;2;156;231;201m →�[0m config set using POSH_THEME: /Users/evermore/dotfiles/oh-my-posh/so-shell.omp.yaml
�[38;2;204;137;214m[TRACE] �[38;2;156;231;201m10:50:36.709 �[0mdebug.go() - �[38;2;156;231;201m8.125µs�[0m
�[38;2;204;137;214m[TRACE] �[38;2;156;231;201m10:50:36.710 �[0mload.go:Load() - �[38;2;156;231;201m459.541µs�[0m
�[38;2;204;137;214m[TRACE] �[38;2;156;231;201m10:50:36.710 �[0mdebug.go() - �[38;2;156;231;201m465.084µs�[0m
[DEBUG] 10:50:36.710 debug.go:52 → plain mode enabled
[DEBUG] 10:50:36.710 home.go:Home:16 → /Users/evermore
[TRACE] 10:50:36.710 terminal.go() - 22.625µs
[DEBUG] 10:50:36.710 terminal.go:59 → loading cache file: /Users/evermore/.cache/oh-my-posh/omp.cache
[DEBUG] 10:50:36.710 terminal.go:59 → loading cache key: upgrade_check
[DEBUG] 10:50:36.710 terminal.go:59 → loading cache key: is_wsl
[TRACE] 10:50:36.710 terminal.go(/Users/evermore/.cache/oh-my-posh/omp.cache) - 61.125µs
[DEBUG] 10:50:36.710 home.go:Home:16 → /Users/evermore
[TRACE] 10:50:36.710 terminal.go() - 7.583µs
[DEBUG] 10:50:36.710 terminal.go:59 → loading cache file: /Users/evermore/.cache/oh-my-posh/omp.cache.badade8a-7864-4976-ae79-31042d483d36
[DEBUG] 10:50:36.710 terminal.go:59 → loading cache key: prompt_count_cache
[TRACE] 10:50:36.710 terminal.go(/Users/evermore/.cache/oh-my-posh/omp.cache.badade8a-7864-4976-ae79-31042d483d36) - 25.417µs
[TRACE] 10:50:36.710 terminal.go:Init() - 750ns
[TRACE] 10:50:36.710 terminal.go() - 0s
[DEBUG] 10:50:36.710 terminal.go:Init:67 → /Users/evermore/dotfiles/oh-my-posh
[TRACE] 10:50:36.710 terminal.go:Init() - 7.292µs
[TRACE] 10:50:36.710 debug.go() - 145.75µs
[TRACE] 10:50:36.710 init.go:Init() - 83ns
[TRACE] 10:50:36.710 cache.go:loadCache() - 41ns
[TRACE] 10:50:36.710 cache.go:loadCache() - 500ns
[TRACE] 10:50:36.710 cache.go:loadCache() - 292ns
[TRACE] 10:50:36.710 cache.go:loadCache() - 0s
[TRACE] 10:50:36.710 cache.go:loadCache() - 0s
[TRACE] 10:50:36.710 cache.go:loadCache() - 292ns
[DEBUG] 10:50:36.710 cache.go:loadCache:34 → false
[TRACE] 10:50:36.710 cache.go:loadCache() - 1.875µs
[TRACE] 10:50:36.710 cache.go:loadCache() - 0s
[TRACE] 10:50:36.710 cache.go:loadCache() - 41ns
[DEBUG] 10:50:36.710 home.go:Home:16 → /Users/evermore
[DEBUG] 10:50:36.710 cache.go:loadCache:48 → false
[TRACE] 10:50:36.710 cache.go:loadCache() - 1.666µs
[TRACE] 10:50:36.710 cache.go:loadCache() - 41ns
[TRACE] 10:50:36.710 cache.go:loadCache() - 0s
[TRACE] 10:50:36.710 cache.go:loadCache() - 0s
[DEBUG] 10:50:36.710 cache.go:loadCache:60 → evermore
[TRACE] 10:50:36.710 cache.go:loadCache() - 1.75µs
[DEBUG] 10:50:36.710 cache.go:loadCache:61 → Sarahs-MBP.home.solaara.net
[TRACE] 10:50:36.710 cache.go:loadCache() - 6.25µs
[TRACE] 10:50:36.710 cache.go:loadCache() - 42ns
[DEBUG] 10:50:36.710 cache.go:loadCache:71 → 1
[TRACE] 10:50:36.710 cache.go:loadCache(SHLVL) - 2.333µs
[DEBUG] 10:50:36.710 debug.go:61 → terminal program: WezTerm
[DEBUG] 10:50:36.710 debug.go:61 → terminal shell: shell
[DEBUG] 10:50:36.710 config.go:MakeColors:58 → NO DATA
[TRACE] 10:50:36.710 config.go:MakeColors(OMP_CACHE_DISABLED) - 3.583µs
[ERROR] 10:50:36.719 colors_darwin.go:GetAccentColor:12 → exit status 1
[DEBUG] 10:50:36.720 colors_darwin.go:GetAccentColor:12 ↓
    2025-01-17 10:50:36.719 defaults[6339:10087246] 
    The domain/default pair of (kCFPreferencesAnyApplication, AppleAccentColor) does not exist
    
[TRACE] 10:50:36.720 colors_darwin.go:GetAccentColor(defaults read -g AppleAccentColor) - 9.480625ms
[ERROR] 10:50:36.720 colors.go:SetAccentColor:178 → exit status 1
[TRACE] 10:50:36.720 colors.go:MakeColors() - 9.491834ms
[TRACE] 10:50:36.720 debug.go:PrintDebug() - 417ns
[DEBUG] 10:50:36.720 debug.go:PrintDebug:16 → 0.101.0
[TRACE] 10:50:36.720 debug.go:PrintDebug(POSH_SHELL_VERSION) - 5.417µs
[DEBUG] 10:50:36.720 debug.go:72 → segment: Title
[TRACE] 10:50:36.720 engine.go:getTitleTemplateText({{.UserName}} in {{.PWD}}) - 383.333µs
[TRACE] 10:50:36.720 primary.go:needsPrimaryRightPrompt() - 42ns
[DEBUG] 10:50:36.720 terminal.go:CursorPosition:583 → NO DATA
[TRACE] 10:50:36.720 terminal.go:CursorPosition(POSH_CURSOR_LINE) - 6.625µs
[DEBUG] 10:50:36.720 terminal.go:CursorPosition:587 → NO DATA
[TRACE] 10:50:36.720 terminal.go:CursorPosition(POSH_CURSOR_COLUMN) - 6.5µs
[TRACE] 10:50:36.720 primary.go:writePrimaryPrompt() - 42ns
[TRACE] 10:50:36.720 primary.go:writePrimaryPrompt() - 0s
[TRACE] 10:50:36.720 segment.go:Execute() - 42ns
[DEBUG] 10:50:36.720 home.go:Home:16 → /Users/evermore
[TRACE] 10:50:36.720 terminal.go:DirMatchesOneOf() - 208ns
[DEBUG] 10:50:36.720 segment.go:Execute:110 → segment: Text
[DEBUG] 10:50:36.720 segment.go:Execute:112 → no toggles found
[TRACE] 10:50:36.720 segment.go:Execute() - 125ns
[DEBUG] 10:50:36.720 home.go:Home:16 → /Users/evermore
[TRACE] 10:50:36.720 terminal.go:DirMatchesOneOf() - 42ns
[DEBUG] 10:50:36.720 segment.go:Execute:110 → segment: Path
[DEBUG] 10:50:36.720 segment.go:Execute:112 → no toggles found
[DEBUG] 10:50:36.720 path.go:147 → display_cygpath: false
[TRACE] 10:50:36.720 path.go:setPaths() - 42ns
[TRACE] 10:50:36.720 path.go:setPaths() - 42ns
[TRACE] 10:50:36.720 path.go:setPaths() - 0s
[TRACE] 10:50:36.720 path.go:setPaths() - 42ns
[TRACE] 10:50:36.720 path.go:parsePath() - 42ns
[DEBUG] 10:50:36.720 path.go:setMappedLocations:557 → mapped_locations_enabled: true
[DEBUG] 10:50:36.720 path.go:setMappedLocations:558 → 
[DEBUG] 10:50:36.720 path.go:setMappedLocations:559 → 
[DEBUG] 10:50:36.720 home.go:Home:16 → /Users/evermore
[TRACE] 10:50:36.720 clean.go:Clean() - 0s
[TRACE] 10:50:36.720 path.go:normalize() - 41ns
[TRACE] 10:50:36.720 path.go:normalize() - 42ns
[DEBUG] 10:50:36.720 path.go:setMappedLocations:560 → ⌂
[DEBUG] 10:50:36.720 path.go:setMappedLocations:565 → mapped_locations: map[]
[TRACE] 10:50:36.720 clean.go:Clean() - 41ns
[TRACE] 10:50:36.720 path.go:normalize() - 42ns
[TRACE] 10:50:36.720 path.go:normalize() - 0s
[TRACE] 10:50:36.720 clean.go:Clean() - 0s
[TRACE] 10:50:36.720 path.go:normalize() - 41ns
[TRACE] 10:50:36.720 path.go:normalize() - 0s
[TRACE] 10:50:36.720 path.go:parsePath() - 42ns
[TRACE] 10:50:36.720 path.go:parsePath() - 41ns
[TRACE] 10:50:36.720 path.go:parsePath() - 42ns
[DEBUG] 10:50:36.720 path.go:makeFolderFormatMap:833 → NO DATA
[DEBUG] 10:50:36.720 path.go:setStyle:213 → powerlevel
[DEBUG] 10:50:36.720 path.go:getMaxWidth:241 → NO DATA
[DEBUG] 10:50:36.720 path.go:getFolderSeparator:267 → NO DATA
[DEBUG] 10:50:36.720 path.go:getFolderSeparator:269 → /
[DEBUG] 10:50:36.720 path.go:colorizePath:734 → cycle: []
[DEBUG] 10:50:36.720 path.go:getFolderSeparator:267 → NO DATA
[DEBUG] 10:50:36.720 path.go:getFolderSeparator:269 → /
[DEBUG] 10:50:36.720 path.go:colorizePath:737 → cycle_folder_separator: false
[DEBUG] 10:50:36.720 path.go:colorizePath:738 → %s
[DEBUG] 10:50:36.720 path.go:colorizePath:740 → %s
[DEBUG] 10:50:36.720 path.go:colorizePath:741 → %s
[DEBUG] 10:50:36.720 path.go:colorizePath:742 → %s
[TRACE] 10:50:36.720 path.go:Enabled() - 42ns
[TRACE] 10:50:36.720 path.go:Enabled() - 41ns
[TRACE] 10:50:36.720 path.go:Enabled() - 42ns
[TRACE] 10:50:36.720 path.go:Enabled(/Users/evermore/dotfiles/oh-my-posh) - 17.542µs
[TRACE] 10:50:36.721 segment.go:string({{ .Path }}) - 194.333µs
[TRACE] 10:50:36.721 segment.go:resolve(powerline) - 83ns
[TRACE] 10:50:36.721 segment.go:string( ) - 83ns
[TRACE] 10:50:36.721 list.go:FirstMatch({{if .Root}}p:red{{end}}) - 11.958µs
[TRACE] 10:50:36.721 segment.go:resolve(plain) - 84ns
[TRACE] 10:50:36.721 list.go:FirstMatch({{if .Root}}p:red{{end}}) - 6.291µs
[TRACE] 10:50:36.721 engine.go:applyPowerShellBleedPatch() - 42ns
[TRACE] 10:50:36.721 engine.go:applyPowerShellBleedPatch() - 0s
[TRACE] 10:50:36.721 primary.go:writePrimaryPrompt() - 41ns
[TRACE] 10:50:36.721 primary.go:Primary() - 41ns
[DEBUG] 10:50:36.721 home.go:Home:16 → /Users/evermore
[TRACE] 10:50:36.721 debug.go:PrintDebug() - 14.125µs
[TRACE] 10:50:36.721 debug.go:PrintDebug() - 0s
@IAMSolaara IAMSolaara added the 🐛 bug Something isn't working label Jan 17, 2025
@IAMSolaara
Copy link
Author

That green color does suspiciously look like the default nushell config prompt's color

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

2 participants