JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
16.72k stars 2.35k forks source link

Spotify segment does not show under WSL if song title contains quotes #4767

Closed newo-2001 closed 6 months ago

newo-2001 commented 6 months ago

Code of Conduct

What happened?

The Spotify segment does not show at all sometimes under WSL, as far as I can tell it happens when the song title contains quotes. I am also using PowerShell on Windows and here it does render correctly using the same oh-my-posh version and config.

The song Grabbitz - Another Form Of "Goodbye" reproduces the issue.

Admittedly I am doing some questionable string manipulation for the segment, but I don't think that is the issue here as it doesn't show at all and the problem doesn't appear on Windows.

I am running version 19.16.1 under Ubuntu WSL with a custom theme.

Theme

{
  "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
  "patch_pwsh_bleed": true,
  "var": {
    "Spotify": {
      "RemixRegex": "(?i).* (?:[-–] (?:(.*) )?(?:remix)|[(([[](?:([^)\\])]]*) )?(?:remix)[)\\])]]).*",
      "ArtistRegex": "(?i) ?([([([]cv[.:] ?.+[)\\])]]|\\b&.*)",
      "SongRegex": " ?(\\[.*\\]|\\(.*\\)|(.*)|[.*]|\\B-.+-\\B|–.+–|~.+~|~.+~)| [-–~~:|] .*"
    }
  },
  "blocks": [
    {
      "alignment": "left",
      "segments": [
        {
          "background_templates": [
            "{{ if contains .OS \"windows\" }}#9adcff{{ end }}",
            "{{ if contains .OS \"ubuntu\" }}#ff8457{{ end }}",
            "{{ if contains .OS \"debian\"}}#d70a53{{ end }}"
          ],
          "foreground_templates": [
            "{{ if contains .OS \"windows\" }}#193549{{ end }}",
            "{{ if contains .OS \"ubuntu\" }}#ffffff{{ end }}",
            "{{ if contains .OS \"debian\" }}#ffffff{{ end }}"
          ],
          "leading_diamond": "",
          "style": "diamond",
          "template": "{{ .Icon }} ",
          "type": "os"
        },
        {
          "background": "parentBackground",
          "foreground": "#fffa6d",
          "style": "powerline",
          "template": " ",
          "type": "root"
        },
        {
          "background": "parentBackground",
          "foreground_templates": [
            "{{ if contains .OS \"windows\" }}#193549{{ end }}",
            "{{ if contains .OS \"ubuntu\" }}#ffffff{{ end }}"
          ],
          "properties": {
            "time_format": "15:04"
          },
          "style": "powerline",
          "template": "{{ .CurrentDate | date .Format }} ",
          "type": "time"
        },
        {
          "background": "parentBackground",
          "foreground": "parentForeground",
          "style": "powerline",
          "templates_logic": "first_match",
          "templates": [
            "{{ if ge .Percentage 75 }} {{ end }}",
            "{{ if ge .Percentage 50 }} {{ end }}",
            "{{ if ge .Percentage 25 }} {{ end }}",
            " "
          ],
          "type": "battery"
        },
        {
          "background": "#ff92fd",
          "foreground": "#193549",
          "powerline_symbol": "",
          "properties": {
            "style": "folder"
          },
          "style": "powerline",
          "templates": [
            "  ",
            "{{ if lower .Path | eq \"src\" }}{{ splitList (eq .OS \"windows\" | ternary \"\\\\\" \"/\") .Parent | reverse | rest | first }}/{{ end }}",
            "{{ .Path }} "
          ],
          "type": "path"
        },
        {
          "background": "#f5f263",
          "foreground": "parentForeground",
          "powerline_symbol": "",
          "properties": {
            "fetch_upstream_icon": true,
            "fetch_stash_count": true,
            "fetch_status": true,
            "branch_icon": " ",
            "git_icon": " "
          },
          "style": "powerline",
          "templates": [
            " {{ .UpstreamIcon }}",
            "({{ .HEAD }}{{ if .Working.Changed }}*{{ end }}) ",
            "{{ if .Ahead }}{{ .Ahead }} {{ end }}",
            "{{ if .Behind }}{{ .Behind }} {{ end }}",
            "{{ if .StashCount }}( +{{ .StashCount }}) {{ end }}",
            "{{ if hasPrefix \"WIP\" .Commit.Subject }} {{ end }}"
          ],
          "type": "git"
        },
        {
          "background": "#b3de6e",
          "foreground": "parentForeground",
          "powerline_symbol": "",
          "style": "powerline",
          "templates": [
            "  ",
            "{{ replaceP .Var.Spotify.ArtistRegex (ternary (default .Artist (regexReplaceAll .Var.Spotify.RemixRegex .Track \"$1$2\")) .Artist (matchP .Var.Spotify.RemixRegex .Track)) \"\" }}",
            "{{ ternary \"  \" \" - \" (matchP .Var.Spotify.RemixRegex .Track) }}",
            "{{ replaceP .Var.Spotify.SongRegex .Track \"\" }} "
          ],
          "type": "spotify"
        },
        {
          "background": "#9bc2ff",
          "foreground": "parentForeground",
          "powerline_symbol": "",
          "style": "powerline",
          "template": "  {{ .Name }} ",
          "type": "az"
        },
        {
          "background": "#6CA35E",
          "foreground": "parentForeground",
          "powerline_symbol": "",
          "style": "powerline",
          "templates": [
            "  ",
            "{{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}",
            "{{ .Full }} "
          ],
          "type": "node"
        },
        {
          "background": "#be925f",
          "foreground": "parentForeground",
          "powerline_symbol": "",
          "style": "powerline",
          "template": "  {{ .Full }} ",
          "type": "rust"
        },
        {
          "background": "#fc7777",
          "foreground": "parentForeground",
          "powerline_symbol": "",
          "style": "powerline",
          "type": "status",
          "template": "{{ if ne .Code 0 }}  {{ end }}"
        }
      ],
      "type": "prompt"
    }
  ],
  "final_space": true,
  "version": 2
}

What OS are you seeing the problem on?

Linux

Which shell are you using?

bash

Log output

Version: 19.16.1

Shell: bash (5.2.15(1)-release)

Prompt:

 11:00    ~ 

Segments:

ConsoleTitle(false)                       -   0 ms
Os(true)                                  -   1 ms
Root(false)                               -   0 ms
Time(true)                                -   1 ms
Battery(true)                             -   0 ms
Path(true)                                -   2 ms
Git(false)                                -   2 ms
Spotify(false)                            - 148 ms
Az(false)                                 -   1 ms
Node(false)                               -   1 ms
Rust(false)                               -   1 ms
Status(false)                             -   2 ms

Run duration: 156.4937ms

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

Config path: /home/owen/.omp/custom.omp.json

Logs:

[DEBUG] 11:00:10.597 shell.go:Getenv:325 → NO DATA
[TRACE] 11:00:10.597 shell.go:Getenv(TERM_PROGRAM) - 29.6µs
[DEBUG] 11:00:10.597 shell.go:Getenv:325 → NO DATA
[TRACE] 11:00:10.597 shell.go:Getenv(OMP_CACHE_DIR) - 3.3µs
[DEBUG] 11:00:10.597 shell.go:Getenv:325 → NO DATA
[TRACE] 11:00:10.597 shell.go:Getenv(XDG_CACHE_HOME) - 1.8µs
[TRACE] 11:00:10.597 shell_unix.go:CachePath() - 15.7µs
[DEBUG] 11:00:10.597 shell.go:Getenv:325 → /home/owen/.omp/custom.omp.json
[TRACE] 11:00:10.597 shell.go:Getenv(POSH_THEME) - 5.2µs
[DEBUG] 11:00:10.597 shell_unix.go:Platform:87 → ubuntu
[TRACE] 11:00:10.597 shell.go:resolveConfigPath() - 12µs
[TRACE] 11:00:10.597 shell.go:Init() - 165.2µs
[TRACE] 11:00:10.597 shell.go:Flags() - 100ns
[TRACE] 11:00:10.600 config.go:loadConfig() - 3.2752ms
[TRACE] 11:00:10.600 shell.go:Flags() - 100ns
[DEBUG] 11:00:10.600 shell.go:Getenv:325 → NO DATA
[TRACE] 11:00:10.600 shell.go:Getenv(OMP_CACHE_DISABLED) - 3.3µs
[DEBUG] 11:00:10.600 shell.go:Shell:593 → no shell name provided in flags, trying to detect it
[DEBUG] 11:00:10.601 shell.go:Shell:601 → process name: bash
[TRACE] 11:00:10.601 shell.go:Shell() - 309.3µs
[DEBUG] 11:00:10.601 shell.go:Getenv:325 → 5.2.15(1)-release
[TRACE] 11:00:10.601 shell.go:Getenv(POSH_SHELL_VERSION) - 2.6µs
[DEBUG] 11:00:10.601 debug.go:PrintDebug:22 → Segment: Title
[DEBUG] 11:00:10.601 text.go:Render:70 → Rendering template:
[DEBUG] 11:00:10.601 shell.go:Getenv:325 → NO DATA
[TRACE] 11:00:10.601 shell.go:Getenv(POSH_CURSOR_LINE) - 2µs
[DEBUG] 11:00:10.601 shell.go:Getenv:325 → NO DATA
[TRACE] 11:00:10.601 shell.go:Getenv(POSH_CURSOR_COLUMN) - 1.6µs
[TRACE] 11:00:10.601 shell.go:Flags() - 0s
[TRACE] 11:00:10.601 shell.go:Flags() - 0s
[TRACE] 11:00:10.601 shell.go:Shell() - 0s
[TRACE] 11:00:10.601 shell.go:Shell() - 0s
[TRACE] 11:00:10.601 shell.go:Flags() - 200ns
[TRACE] 11:00:10.601 shell.go:Flags() - 100ns
[DEBUG] 11:00:10.601 properties.go:GetString:28 → {{ .Code }}
[TRACE] 11:00:10.601 shell.go:GOOS() - 0s
[DEBUG] 11:00:10.601 shell.go:Pwd:355 → /home/owen
[TRACE] 11:00:10.601 shell.go:Flags() - 0s
[TRACE] 11:00:10.601 shell.go:Pwd() - 17.3µs
[TRACE] 11:00:10.601 shell.go:GOOS() - 100ns
[TRACE] 11:00:10.601 shell.go:Pwd() - 100ns
[DEBUG] 11:00:10.601 segment.go:SetEnabled:526 → Segment: Path
[TRACE] 11:00:10.601 shell.go:GOOS() - 100ns
[DEBUG] 11:00:10.601 segment.go:SetEnabled:526 → Segment: Git
[TRACE] 11:00:10.601 shell.go:Pwd() - 100ns
[TRACE] 11:00:10.601 shell.go:Shell() - 0s
[TRACE] 11:00:10.601 shell.go:Shell() - 0s
[DEBUG] 11:00:10.601 shell_unix.go:IsWsl:35 → true
[TRACE] 11:00:10.601 shell_unix.go:IsWsl() - 3.1µs
[DEBUG] 11:00:10.601 properties.go:GetBool:22 → mapped_locations_enabled: true
[DEBUG] 11:00:10.601 shell.go:FileContent:467 ↓
    5.10.16.3-microsoft-standard-WSL2

[DEBUG] 11:00:10.601 properties.go:GetString:28 → 
[TRACE] 11:00:10.601 shell.go:FileContent(/proc/sys/kernel/osrelease) - 17.1µs
[DEBUG] 11:00:10.601 properties.go:GetString:28 → 
[TRACE] 11:00:10.601 shell_unix.go:IsWsl2() - 25.4µs
[TRACE] 11:00:10.601 shell.go:GOOS() - 0s
[TRACE] 11:00:10.601 shell.go:Pwd() - 100ns
[DEBUG] 11:00:10.601 properties.go:GetString:28 → ~
[DEBUG] 11:00:10.601 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[TRACE] 11:00:10.601 shell.go:PathSeparator() - 0s
[TRACE] 11:00:10.601 shell.go:GOOS() - 100ns
[TRACE] 11:00:10.601 shell.go:GOOS() - 0s
[TRACE] 11:00:10.601 shell.go:GOOS() - 0s
[TRACE] 11:00:10.601 shell.go:GOOS() - 0s
[TRACE] 11:00:10.601 shell.go:PathSeparator() - 0s
[TRACE] 11:00:10.601 shell.go:PathSeparator() - 100ns
[TRACE] 11:00:10.601 shell.go:GOOS() - 100ns
[TRACE] 11:00:10.601 shell.go:GOOS() - 0s
[TRACE] 11:00:10.601 shell.go:PathSeparator() - 0s
[TRACE] 11:00:10.601 shell.go:GOOS() - 100ns
[TRACE] 11:00:10.601 shell.go:GOOS() - 0s
[TRACE] 11:00:10.601 shell.go:PathSeparator() - 0s
[TRACE] 11:00:10.601 shell.go:GOOS() - 0s
[TRACE] 11:00:10.601 shell.go:GOOS() - 0s
[TRACE] 11:00:10.601 shell.go:PathSeparator() - 0s
[TRACE] 11:00:10.601 shell.go:Pwd() - 100ns
[DEBUG] 11:00:10.601 shell_unix.go:IsWsl:35 → true
[TRACE] 11:00:10.601 shell_unix.go:IsWsl() - 3µs
[TRACE] 11:00:10.601 shell.go:Flags() - 100ns
[TRACE] 11:00:10.601 shell.go:Pwd() - 200ns
[TRACE] 11:00:10.601 shell.go:GOOS() - 100ns
[DEBUG] 11:00:10.601 segment.go:SetEnabled:526 → Segment: Root
[TRACE] 11:00:10.601 shell_unix.go:Root() - 400ns
[TRACE] 11:00:10.601 shell.go:Flags() - 0s
[TRACE] 11:00:10.601 shell.go:Pwd() - 100ns
[TRACE] 11:00:10.601 shell.go:GOOS() - 100ns
[DEBUG] 11:00:10.601 segment.go:SetEnabled:526 → Segment: Os
[TRACE] 11:00:10.601 shell.go:GOOS() - 0s
[DEBUG] 11:00:10.601 shell_unix.go:Platform:87 → ubuntu
[DEBUG] 11:00:10.601 properties.go:GetBool:22 → display_distro_name: false
[TRACE] 11:00:10.601 shell.go:Flags() - 200ns
[DEBUG] 11:00:10.601 properties.go:GetString:28 → 
[TRACE] 11:00:10.601 shell_unix.go:Root() - 200ns
[TRACE] 11:00:10.601 shell.go:Pwd() - 200ns
[TRACE] 11:00:10.601 shell.go:GOOS() - 100ns
[TRACE] 11:00:10.601 shell.go:Shell() - 100ns
[DEBUG] 11:00:10.601 segment.go:SetEnabled:526 → Segment: Time
[TRACE] 11:00:10.601 shell.go:StatusCodes() - 0s
[DEBUG] 11:00:10.601 shell_unix.go:IsWsl:35 → true
[DEBUG] 11:00:10.601 properties.go:GetString:28 → 15:04
[TRACE] 11:00:10.601 shell_unix.go:IsWsl() - 2.5µs
[DEBUG] 11:00:10.601 shell.go:TemplateCache:774 → environment: [SHELL=/bin/bash NVM_INC=/home/owen/.nvm/versions/node/v21.6.0/include/node POSH_PID=7324 WSL_DISTRO_NAME=Ubuntu WT_SESSION=b2716c81-9a51-4ec4-879e-04c60f5d546a EZA_COLORS=Dockerfile*=38;5;69:docker-compose*.y*ml=38;5;69:*.cs=38;5;70:*.csproj=38;5;70:*.js*=38;5;226:*.css=38;5;69:*.s?ss=38;5;212:*.html=38;5;202:*.csv=38;5;70:*.fs*=38;5;39:*.ts*=38;5;39:*.php=38;5;69:*.py=38;5;226:*.?pp=38;5;70:*.exe=38;5;8:*.dll=38;5;8:*.so=38;5;8:*.bin=38;5;8:*.rs=38;5;173:*.rb=38;5;196:*.sln=38;5;135:*.hs=38;5;141:*.ex=38;5;141:*.kt*=38;5;141:*.go=38;5;39:*.java=38;5;196:*.scala=38;5;196:*.tf=38;5;135:*.bicep=38;5;39:*.sh=38;5;70:*.ps*=38;5;69:*.tex=38;5;79:*.dart=38;5;79:*.pdf=38;5;196:*.graphql=38;5;212:*.xls*=38;5;70:*.doc*=38;5;69:*.ppt*=38;5;196:*.md=38;5;173:*.swift=38;5;202 HOMEBREW_PREFIX=/home/linuxbrew/.linuxbrew NAME=OEG-J8KCS93 PWD=/home/owen USERPROFILE=/mnt/c/Users/elderbroekowe LOGNAME=owen MANPATH=/home/owen/.nvm/versions/node/v21.6.0/share/man:/home/linuxbrew/.linuxbrew/share/man: HOME=/home/owen LANG=C.UTF-8 WSL_INTEROP=/run/WSL/7323_interop LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90: POSH_SHELL_VERSION=5.2.15(1)-release CONDA_PROMPT_MODIFIER=false LOCALAPPDATA=/mnt/c/Users/elderbroekowe/AppData/Local BAT_THEME=Catppuccin-mocha DOTNET_BUNDLE_EXTRACT_BASE_DIR=/home/owen/.cache/dotnet_bundle_extract INFOPATH=/home/linuxbrew/.linuxbrew/share/info: NVM_DIR=/home/owen/.nvm LESSCLOSE=/usr/bin/lesspipe %s %s TERM=xterm-256color LESSOPEN=| /usr/bin/lesspipe %s USER=owen HOMEBREW_CELLAR=/home/linuxbrew/.linuxbrew/Cellar SHLVL=1 NVM_CD_FLAGS= HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew/Homebrew POSH_THEME=/home/owen/.omp/custom.omp.json WSLENV=WT_SESSION:WT_PROFILE_ID:USERPROFILE/up:LOCALAPPDATA/up XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop PATH=/home/owen/.nvm/versions/node/v21.6.0/bin:/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/Microsoft/jdk-11.0.21.9-hotspot/bin:/mnt/c/Program Files/Common Files/Oracle/Java/javapath:/mnt/c/Program Files (x86)/Microsoft SDKs/Azure/CLI2/wbin:/mnt/c/Python311/Scripts/:/mnt/c/Python311/:/mnt/c/Program Files (x86)/ARM/ADSv1_2/bin:/mnt/c/Python27-64/:/mnt/c/Python27-64/Scripts:/mnt/c/Python27/:/mnt/c/Python27/Scripts:/mnt/c/Perl/bin:/mnt/c/ProgramData/Oracle/Java/javapath:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit/:/mnt/c/Program Files/Microsoft SQL Server/110/Tools/Binn/:/mnt/c/Program Files (x86)/Microsoft SDKs/TypeScript/1.0/:/mnt/c/Program Files/Microsoft SQL Server/120/Tools/Binn/:/mnt/c/WINDOWS/SysWOW64:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files/Microsoft SQL Server/150/Tools/Binn/:/mnt/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn/:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files (x86)/Yarn/bin/:/mnt/c/Program Files/nodejs/:/mnt/c/Program Files (x86)/Windows Kits/10/Windows Performance Toolkit/:/mnt/c/Strawberry/c/bin:/mnt/c/Strawberry/perl/site/bin:/mnt/c/Strawberry/perl/bin:/mnt/c/Users/elderbroekowe/.cargo/bin:/mnt/c/Users/elderbroekowe/AppData/Local/Programs/Python/Python310/Scripts/:/mnt/c/Users/elderbroekowe/AppData/Local/Programs/Python/Python310/:/mnt/c/Users/elderbroekowe/AppData/Local/Programs/Python/Launcher/:/mnt/c/Users/elderbroekowe/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/elderbroekowe/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/elderbroekowe/AppData/Roaming/npm:/mnt/c/Users/elderbroekowe/AppData/Local/Programs/MiKTeX/miktex/bin/x64/:/mnt/c/Users/elderbroekowe/AppData/Local/Strawberry-perl/perl/bin:/mnt/c/Users/elderbroekowe/AppData/Local/Programs/oh-my-posh/bin:/mnt/c/Users/elderbroekowe/AppData/Local/Vim/vim90:/mnt/c/Users/elderbroekowe/.dotnet/tools:/mnt/c/dapr:/mnt/c/Users/elderbroekowe/Documents/Programs/bin:/mnt/c/Users/elderbroekowe/.dapr/bin:/mnt/c/Users/elderbroekowe/.dapr/bin:/mnt/c/Users/elderbroekowe/.dapr/bin:/mnt/c/Users/elderbroekowe/AppData/Local/Microsoft/WinGet/Packages/dandavison.delta_Microsoft.Winget.Source_8wekyb3d8bbwe/delta-0.16.5-x86_64-pc-windows-msvc:/mnt/c/Users/elderbroekowe/.dotnet/tools:/mnt/c/Users/elderbroekowe/AppData/Local/Programs/Git/cmd:/mnt/c/Users/elderbroekowe/AppData/Local/Microsoft/WinGet/Links:/mnt/c/Users/elderbroekowe/AppData/Local/Yarn/bin:/mnt/c/Program Files/Microsoft Visual Studio/2022/Professional/Common7/IDE/Extensions/Microsoft/Azure Storage Emulator:/mnt/c/Program Files/JetBrains/IntelliJ IDEA Community Edition 2023.3.2/bin:/mnt/c/Users/elderbroekowe/Documents/Programs/Maven/bin:/snap/bin:/home/owen/.dotnet/tools NVM_BIN=/home/owen/.nvm/versions/node/v21.6.0/bin HOSTTYPE=x86_64 POWERLINE_COMMAND=oh-my-posh WT_PROFILE_ID={61c54bbd-c2c6-5271-96e7-009a87ff44bf} DOTFILES=/mnt/c/Users/elderbroekowe/Documents/Repositories/dotfiles _=/home/linuxbrew/.linuxbrew/bin/oh-my-posh OLDPWD=/home/owen]
[TRACE] 11:00:10.602 shell.go:Pwd() - 300ns
[TRACE] 11:00:10.602 shell.go:GOOS() - 100ns
[TRACE] 11:00:10.602 shell.go:GOOS() - 0s
[TRACE] 11:00:10.602 shell.go:GOOS() - 0s
[TRACE] 11:00:10.602 shell.go:GOOS() - 0s
[TRACE] 11:00:10.602 shell.go:GOOS() - 100ns
[TRACE] 11:00:10.602 shell.go:GOOS() - 0s
[DEBUG] 11:00:10.602 shell.go:User:493 → owen
[TRACE] 11:00:10.602 shell.go:User() - 3.4µs
[DEBUG] 11:00:10.602 shell.go:Host:505 → OEG-J8KCS93
[TRACE] 11:00:10.602 shell.go:Host() - 4.6µs
[TRACE] 11:00:10.602 shell.go:GOOS() - 100ns
[DEBUG] 11:00:10.602 shell_unix.go:Platform:87 → ubuntu
[DEBUG] 11:00:10.602 shell.go:Getenv:325 → 1
[TRACE] 11:00:10.602 shell.go:Getenv(SHLVL) - 2.6µs
[TRACE] 11:00:10.602 shell.go:TemplateCache() - 1.2569ms
[TRACE] 11:00:10.602 shell.go:Pwd() - 200ns
[TRACE] 11:00:10.602 shell.go:GOOS() - 100ns
[TRACE] 11:00:10.602 shell.go:TemplateCache() - 1.2736ms
[DEBUG] 11:00:10.602 segment.go:SetEnabled:526 → Segment: Az
[TRACE] 11:00:10.602 shell.go:Pwd() - 100ns
[TRACE] 11:00:10.602 shell.go:GOOS() - 100ns
[TRACE] 11:00:10.602 shell.go:Pwd() - 300ns
[DEBUG] 11:00:10.602 segment.go:SetEnabled:526 → Segment: Rust
[TRACE] 11:00:10.602 shell.go:GOOS() - 0s
[DEBUG] 11:00:10.602 properties.go:GetString:28 → first_match
[DEBUG] 11:00:10.602 segment.go:SetEnabled:526 → Segment: Node
[DEBUG] 11:00:10.602 shell.go:Getenv:325 → NO DATA
[TRACE] 11:00:10.602 shell.go:Getenv(AZURE_CONFIG_DIR) - 3.2µs
[DEBUG] 11:00:10.602 properties.go:GetStringArray:52 → extensions: [*.rs Cargo.toml Cargo.lock]
[DEBUG] 11:00:10.602 properties.go:GetStringArray:52 → extensions: [*.js *.ts package.json .nvmrc pnpm-workspace.yaml .pnpmfile.cjs .npmrc .vue]
[DEBUG] 11:00:10.602 properties.go:GetStringArray:52 → folders: []
[DEBUG] 11:00:10.602 properties.go:GetStringArray:52 → folders: []
[ERROR] 11:00:10.602 shell.go:HasFilesInDir:377 → open .: no such file or directory
[DEBUG] 11:00:10.602 properties.go:GetBool:22 → home_enabled: false
[DEBUG] 11:00:10.602 properties.go:GetBool:22 → home_enabled: false
[TRACE] 11:00:10.602 shell.go:Pwd() - 100ns
[TRACE] 11:00:10.602 shell.go:HasFilesInDir(azureProfile.json) - 17.1µs
[ERROR] 11:00:10.602 shell.go:HasFilesInDir:377 → open .: no such file or directory
[DEBUG] 11:00:10.602 shell.go:HasFilesInDir:378 → false
[TRACE] 11:00:10.602 shell.go:HasFilesInDir(azureProfile.json) - 7.1µs
[TRACE] 11:00:10.602 shell.go:Flags() - 200ns
[DEBUG] 11:00:10.603 shell.go:Getenv:325 → NO DATA
[TRACE] 11:00:10.603 shell.go:Getenv(POSH_AZURE_SUBSCRIPTION) - 2.3µs
[TRACE] 11:00:10.603 shell.go:Pwd() - 100ns
[TRACE] 11:00:10.603 shell.go:GOOS() - 0s
[DEBUG] 11:00:10.603 segment.go:SetEnabled:526 → Segment: Battery
[DEBUG] 11:00:10.603 shell_unix.go:IsWsl:35 → true
[TRACE] 11:00:10.603 shell_unix.go:IsWsl() - 7.4µs
[DEBUG] 11:00:10.603 shell_unix.go:IsWsl:35 → true
[TRACE] 11:00:10.603 shell_unix.go:IsWsl() - 2.4µs
[TRACE] 11:00:10.603 shell.go:Flags() - 200ns
[TRACE] 11:00:10.603 shell.go:Pwd() - 200ns
[TRACE] 11:00:10.603 shell.go:GOOS() - 0s
[DEBUG] 11:00:10.603 segment.go:SetEnabled:526 → Segment: Spotify
[DEBUG] 11:00:10.603 shell.go:FileContent:467 ↓
    5.10.16.3-microsoft-standard-WSL2

[TRACE] 11:00:10.603 shell.go:FileContent(/proc/sys/kernel/osrelease) - 39.3µs
[DEBUG] 11:00:10.603 shell_unix.go:IsWsl:35 → true
[TRACE] 11:00:10.603 shell_unix.go:IsWsl2() - 47.4µs
[TRACE] 11:00:10.603 shell_unix.go:IsWsl() - 6.8µs
[TRACE] 11:00:10.603 shell_windows_nix.go:BatteryState() - 61.9µs
[DEBUG] 11:00:10.603 properties.go:GetString:28 → NO DATA
[TRACE] 11:00:10.603 shell.go:TemplateCache() - 200ns
[DEBUG] 11:00:10.603 shell.go:RunCommand:523 → //wsl$/Ubuntu/home/owen
[TRACE] 11:00:10.603 shell.go:RunCommand(wslpath -m /home/owen) - 2.2048ms
[TRACE] 11:00:10.603 shell.go:StackCount() - 100ns
[TRACE] 11:00:10.603 shell_unix.go:DirIsWritable(/home/owen) - 5.4µs
[TRACE] 11:00:10.603 shell.go:TemplateCache() - 100ns
[DEBUG] 11:00:10.603 shell.go:RunCommand:523 → //wsl$/Ubuntu/home/owen
[TRACE] 11:00:10.603 shell.go:RunCommand(wslpath -m /home/owen) - 2.3037ms
[TRACE] 11:00:10.603 shell.go:GOOS() - 0s
[DEBUG] 11:00:10.603 shell.go:CommandPath:545 → /usr/bin/git
[TRACE] 11:00:10.603 shell.go:CommandPath(git) - 20.3µs
[TRACE] 11:00:10.603 shell.go:HasCommand(git) - 22.8µs
[TRACE] 11:00:10.603 shell.go:TemplateCache() - 300ns
[TRACE] 11:00:10.603 shell.go:Pwd() - 100ns
[ERROR] 11:00:10.603 shell.go:HasParentFilePath:689 → stat .git: no such file or directory
[TRACE] 11:00:10.603 shell.go:HasParentFilePath(.git) - 11.3µs
[DEBUG] 11:00:10.603 properties.go:GetBool:22 → always_enabled: false
[DEBUG] 11:00:10.603 properties.go:GetBool:22 → fetch_bare_info: false
[DEBUG] 11:00:10.751 shell.go:RunCommand:523 ↓
    "Spotify.exe","13748","Console","1","303.744 K","Running","GARMIN\elderbroekowe","0:03:58","Grabbitz - Another Form Of "Goodbye""
    "Spotify.exe","4208","Console","1","31.544 K","Running","GARMIN\elderbroekowe","0:00:00","N/A"
    "Spotify.exe","14528","Console","1","184.020 K","Running","GARMIN\elderbroekowe","0:02:54","N/A"
    "Spotify.exe","14488","Console","1","53.828 K","Unknown","GARMIN\elderbroekowe","0:00:08","N/A"
    "Spotify.exe","14800","Console","1","29.576 K","Unknown","GARMIN\elderbroekowe","0:00:00","N/A"
    "Spotify.exe","19836","Console","1","237.360 K","Unknown","GARMIN\elderbroekowe","0:07:46","N/A"
[TRACE] 11:00:10.751 shell.go:RunCommand(tasklist.exe /V /FI Imagename eq Spotify.exe /FO CSV /NH) - 148.5664ms
[DEBUG] 11:00:10.751 text.go:Render:70 → Rendering template: {{ .Icon }}
[DEBUG] 11:00:10.751 text.go:Render:70 → Rendering template: {{ .CurrentDate | date .Format }}
[DEBUG] 11:00:10.751 text.go:Render:70 → Rendering template: {{ if ge .Percentage 75 }} {{ end }}
[DEBUG] 11:00:10.751 text.go:Render:70 → Rendering template:  
[DEBUG] 11:00:10.751 text.go:Render:70 → Rendering template: {{ if lower .Path | eq "src" }}{{ splitList (eq .OS "windows" | ternary "\\" "/") .Parent | reverse | rest | first }}/{{ end }}
[TRACE] 11:00:10.752 shell.go:TemplateCache() - 900ns
[TRACE] 11:00:10.752 shell.go:Shell() - 400ns
[TRACE] 11:00:10.752 shell.go:TemplateCache() - 400ns
[TRACE] 11:00:10.752 shell.go:TemplateCache() - 300ns
[TRACE] 11:00:10.752 shell.go:Shell() - 100ns
[TRACE] 11:00:10.752 shell.go:Shell() - 100ns
[TRACE] 11:00:10.752 shell.go:TemplateCache() - 200ns
[DEBUG] 11:00:10.752 text.go:Render:70 → Rendering template: {{ .Path }}
[TRACE] 11:00:10.752 shell.go:TemplateCache() - 200ns
[TRACE] 11:00:10.752 shell.go:Shell() - 0s
[DEBUG] 11:00:10.753 text.go:Render:70 → Rendering template: {{ if contains .OS "windows" }}#9adcff{{ end }}
[TRACE] 11:00:10.753 shell.go:TemplateCache() - 300ns
[DEBUG] 11:00:10.753 text.go:Render:70 → Rendering template: {{ if contains .OS "ubuntu" }}#ff8457{{ end }}
[TRACE] 11:00:10.753 shell.go:TemplateCache() - 200ns
[DEBUG] 11:00:10.753 text.go:Render:70 → Rendering template: {{ if contains .OS "windows" }}#193549{{ end }}
[TRACE] 11:00:10.753 shell.go:TemplateCache() - 100ns
[DEBUG] 11:00:10.753 text.go:Render:70 → Rendering template: {{ if contains .OS "ubuntu" }}#ffffff{{ end }}
[TRACE] 11:00:10.753 shell.go:TemplateCache() - 0s
[DEBUG] 11:00:10.753 text.go:Render:70 → Rendering template: diamond
[DEBUG] 11:00:10.753 text.go:Render:70 → Rendering template: powerline
[DEBUG] 11:00:10.753 text.go:Render:70 → Rendering template: {{ if contains .OS "windows" }}#193549{{ end }}
[TRACE] 11:00:10.753 shell.go:TemplateCache() - 200ns
[DEBUG] 11:00:10.753 text.go:Render:70 → Rendering template: {{ if contains .OS "ubuntu" }}#ffffff{{ end }}
[TRACE] 11:00:10.753 shell.go:TemplateCache() - 100ns
[DEBUG] 11:00:10.753 text.go:Render:70 → Rendering template: powerline
[DEBUG] 11:00:10.753 text.go:Render:70 → Rendering template: powerline
[DEBUG] 11:00:10.753 text.go:Render:70 → Rendering template: powerline
[DEBUG] 11:00:10.753 text.go:Render:70 → Rendering template: powerline
[DEBUG] 11:00:10.753 text.go:Render:70 → Rendering template: powerline
[DEBUG] 11:00:10.753 text.go:Render:70 → Rendering template: powerline
[DEBUG] 11:00:10.753 text.go:Render:70 → Rendering template: powerline
[DEBUG] 11:00:10.753 text.go:Render:70 → Rendering template: powerline
[DEBUG] 11:00:10.753 text.go:Render:70 → Rendering template: powerline
[TRACE] 11:00:10.753 shell.go:Shell() - 100ns
[TRACE] 11:00:10.753 shell.go:Shell() - 100ns
[TRACE] 11:00:10.753 shell.go:Shell() - 100ns
[TRACE] 11:00:10.753 shell.go:Shell() - 0s
[DEBUG] 11:00:10.753 shell.go:Getenv:325 → NO DATA
[TRACE] 11:00:10.753 shell.go:Getenv(OMP_CACHE_DIR) - 4.6µs
[DEBUG] 11:00:10.753 shell.go:Getenv:325 → NO DATA
[TRACE] 11:00:10.753 shell.go:Getenv(XDG_CACHE_HOME) - 1.9µs
[TRACE] 11:00:10.753 shell_unix.go:CachePath() - 20.9µs
[TRACE] 11:00:10.753 shell.go:Flags() - 0s
JanDeDobbeleer commented 6 months ago

@newo-2001 the " is indeed the issue, but it's actually a bug in tasklist as those should be escaped when exporting to csv. I'll change the logic to reading lines instead of csv parsing.

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