JanDeDobbeleer / oh-my-posh

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

`config export` gives bad output in some invocations #4750

Closed jacktose closed 8 months ago

jacktose commented 8 months ago

Code of Conduct

What happened?

The oh-my-posh config export command does not work (as expected) in a few different ways. (Please let me know if I should break this into ~5 issues.)

TOML & YAML output is broken

Fully specified export of default config with expected file extensions. JSON works perfectly. TOML & YAML only output the schema definition.

$ oh-my-posh config export --format json --output default.omp.json
$ oh-my-posh config export --format toml --output default.omp.toml
$ oh-my-posh config export --format yaml --output default.omp.yaml

$ ls -lh
total 16K
-rwxr-xr-x 1 jacktose jacktose 5.5K 2024-03-08 14:42 default.omp.json*
-rwxr-xr-x 1 jacktose jacktose   94 2024-03-08 14:44 default.omp.toml*
-rwxr-xr-x 1 jacktose jacktose  117 2024-03-08 14:44 default.omp.yaml*

$ head -5 default.omp.json
{
  "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
  "version": 2,
  "final_space": true,
  "console_title_template": "{{ .Shell }} in {{ .Folder }}",

$ cat default.omp.toml
#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json

$ cat default.omp.yaml
# yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
It's the same when outputting to stdout. ```shell $ oh-my-posh config export --format json | head -5 { "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", "version": 2, "final_space": true, "console_title_template": "{{ .Shell }} in {{ .Folder }}", $ oh-my-posh config export --format toml #:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json $ oh-my-posh config export --format yaml # yaml-language-server: $schema=https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json ```

This is only when exporting the default config. All 3 formats work fine when an input --config is specified. (Edit: Actually maybe YAML output is invalid. Looking into that.) (The other issues below apply to default and specified configs.)

File extension inference overrides --format option

Specify format but a non-matching file extension. Output is the same as above for each extension, not for each format. This breaks the user's expectation of the explicitly set output format, and of setting any filename they want for output.

$ oh-my-posh config export --format json --output "should-be-json.json"
$ oh-my-posh config export --format toml --output "should-be-toml.json"
$ oh-my-posh config export --format yaml --output "should-be-yaml.json"
$ oh-my-posh config export --format json --output "should-be-json.toml"
$ oh-my-posh config export --format toml --output "should-be-toml.toml"
$ oh-my-posh config export --format yaml --output "should-be-yaml.toml"
$ oh-my-posh config export --format json --output "should-be-json.yaml"
$ oh-my-posh config export --format toml --output "should-be-toml.yaml"
$ oh-my-posh config export --format yaml --output "should-be-yaml.yaml"

$ ls -lhX
total 48K
-rwxr-xr-x 1 jacktose jacktose 5.5K 2024-03-08 15:04 should-be-json.json*
-rwxr-xr-x 1 jacktose jacktose 5.5K 2024-03-08 15:04 should-be-toml.json*
-rwxr-xr-x 1 jacktose jacktose 5.5K 2024-03-08 15:04 should-be-yaml.json*
-rwxr-xr-x 1 jacktose jacktose   94 2024-03-08 15:04 should-be-json.toml*
-rwxr-xr-x 1 jacktose jacktose   94 2024-03-08 15:04 should-be-toml.toml*
-rwxr-xr-x 1 jacktose jacktose   94 2024-03-08 15:04 should-be-yaml.toml*
-rwxr-xr-x 1 jacktose jacktose  117 2024-03-08 15:04 should-be-json.yaml*
-rwxr-xr-x 1 jacktose jacktose  117 2024-03-08 15:04 should-be-toml.yaml*
-rwxr-xr-x 1 jacktose jacktose  117 2024-03-08 15:04 should-be-yaml.yaml*

Other extensions create empty files

Specify --format and a file extension besides json, toml, yaml, or no extension. Blank files are written.

$ oh-my-posh config export --format json --output default.omp.json.backup
$ oh-my-posh config export --format toml --output default.omp.toml.backup
$ oh-my-posh config export --format yaml --output default.omp.yaml.backup
$ oh-my-posh config export --format json --output foobar

$ ls -lh
total 0
-rwxr-xr-x 1 jacktose jacktose 0 2024-03-08 15:16 default.omp.json.backup*
-rwxr-xr-x 1 jacktose jacktose 0 2024-03-08 15:16 default.omp.toml.backup*
-rwxr-xr-x 1 jacktose jacktose 0 2024-03-08 15:17 default.omp.yaml.backup*
-rwxr-xr-x 1 jacktose jacktose 0 2024-03-08 15:18 foobar*

Files are executable

See examples above. All output files are world-executable, mode 755 aka -rwxr-xr-x. My umask is 0022 so my default file mode is 644 aka -rw-r--r--. I'm not sure why OMP sets the mode, but it should probably be left at default.

Failure is silent

Command fails silently and returns 0. Should return something else to indicate failure, and preferably print something helpful to stderr.

$ oh-my-posh config export
$ echo $?
0
$ ls -lh
total 0

Theme

default

What OS are you seeing the problem on?

Linux (WSL Ubuntu 22.04)

Which shell are you using?

bash (GNU bash, version 5.1.16(1)-release)

Log output

oh-my-posh debug --plain ```Shell Version: 19.13.0 Shell: bash (5.1.16(1)-release) Prompt:  jacktose   ]8;;file://wsl.localhost/Ubuntu/home/jacktose/.config/oh-my-posh\oh-my-posh]8;;\    7 in bash at 15:52:168 Segments: ConsoleTitle(true) - 0 ms Session(true) - 1 ms Path(true) - 2 ms Git(false) - 0 ms Root(false) - 0 ms Status(true) - 1 ms Node(false) - 0 ms Go(false) - 0 ms Python(false) - 0 ms Shell(true) - 0 ms Time(true) - 0 ms Run duration: 5.575101ms Cache path: /home/jacktose/.cache/oh-my-posh Config path: no --config set, using default built-in configuration Logs: [DEBUG] 15:52:16.187 shell.go:Getenv:398 → NO DATA [TRACE] 15:52:16.187 shell.go:Getenv(TERM_PROGRAM) - 15.483µs [DEBUG] 15:52:16.187 shell.go:Getenv:398 → NO DATA [TRACE] 15:52:16.187 shell.go:Getenv(OMP_CACHE_DIR) - 1.994µs [DEBUG] 15:52:16.187 shell.go:Getenv:398 → NO DATA [TRACE] 15:52:16.187 shell.go:Getenv(XDG_CACHE_HOME) - 1.398µs [TRACE] 15:52:16.187 shell_unix.go:CachePath() - 10.914µs [DEBUG] 15:52:16.188 shell.go:Getenv:398 → NO DATA [TRACE] 15:52:16.188 shell.go:Getenv(POSH_THEME) - 2.792µs [DEBUG] 15:52:16.188 shell.go:resolveConfigPath:318 → No config set, fallback to default config [TRACE] 15:52:16.188 shell.go:resolveConfigPath() - 10.032µs [TRACE] 15:52:16.188 shell.go:Init() - 478.264µs [TRACE] 15:52:16.188 shell.go:Flags() - 36ns [DEBUG] 15:52:16.188 config.go:loadConfig:129 → no config file specified, using default [TRACE] 15:52:16.188 config.go:loadConfig() - 12.041µs [TRACE] 15:52:16.188 shell.go:Flags() - 23ns [DEBUG] 15:52:16.188 shell.go:Getenv:398 → NO DATA [TRACE] 15:52:16.188 shell.go:Getenv(OMP_CACHE_DISABLED) - 1.565µs [DEBUG] 15:52:16.188 shell.go:Shell:663 → no shell name provided in flags, trying to detect it [DEBUG] 15:52:16.188 shell.go:Shell:671 → process name: bash [TRACE] 15:52:16.188 shell.go:Shell() - 335.624µs [DEBUG] 15:52:16.188 shell.go:Getenv:398 → 5.1.16(1)-release [TRACE] 15:52:16.188 shell.go:Getenv(POSH_SHELL_VERSION) - 2µs [DEBUG] 15:52:16.188 debug.go:PrintDebug:22 → Segment: Title [DEBUG] 15:52:16.188 text.go:Render:70 → Rendering template: {{ .Shell }} in {{ .Folder }} [TRACE] 15:52:16.189 shell_unix.go:Root() - 415ns [TRACE] 15:52:16.189 shell.go:Shell() - 114ns [TRACE] 15:52:16.189 shell.go:StatusCodes() - 48ns [DEBUG] 15:52:16.189 shell_unix.go:IsWsl:35 → true [TRACE] 15:52:16.189 shell_unix.go:IsWsl() - 2.724µs [DEBUG] 15:52:16.189 shell.go:TemplateCache:844 → environment: [SHELL=/bin/bash LSCOLORS=GxFxCxDxBxegedabagaced LESS=FiRj.2M WHOIS_OPTIONS=-H HISTCONTROL= WSL2_GUI_APPS_ENABLED=1 POSH_PID=45072 HOMEBREW_DISPLAY_INSTALL_TIMES=1 WSL_DISTRO_NAME=Ubuntu WT_SESSION=6f3bdfb2-a11b-4551-9216-ce21682a4749 HOMEBREW_PREFIX=/home/linuxbrew/.linuxbrew GPG_TTY=/dev/pts/0 NAME=jacktose-2 PWD=/home/jacktose/.config/oh-my-posh LOGNAME=jacktose MANPATH=/home/linuxbrew/.linuxbrew/share/man:/home/linuxbrew/.linuxbrew/share/man:: HOME=/home/jacktose LANG=C.UTF-8 WSL_INTEROP=/run/WSL/45070_interop LS_COLORS=*.7z=38;5;40:*.WARC=38;5;40:*.a=38;5;40:*.arj=38;5;40:*.bz2=38;5;40:*.cpio=38;5;40:*.gz=38;5;40:*.lrz=38;5;40:*.lz=38;5;40:*.lzma=38;5;40:*.lzo=38;5;40:*.rar=38;5;40:*.s7z=38;5;40:*.sz=38;5;40:*.tar=38;5;40:*.tbz=38;5;40:*.tgz=38;5;40:*.warc=38;5;40:*.xz=38;5;40:*.z=38;5;40:*.zip=38;5;40:*.zipx=38;5;40:*.zoo=38;5;40:*.zpaq=38;5;40:*.zst=38;5;40:*.zstd=38;5;40:*.zz=38;5;40:*@.service=38;5;45:*AUTHORS=38;5;220;1:*CHANGES=38;5;220;1:*CONTRIBUTORS=38;5;220;1:*COPYING=38;5;220;1:*COPYRIGHT=38;5;220;1:*CodeResources=38;5;239:*Dockerfile=38;5;155:*HISTORY=38;5;220;1:*INSTALL=38;5;220;1:*LICENSE=38;5;220;1:*LS_COLORS=48;5;89;38;5;197;1;3;4;7:*MANIFEST=38;5;243:*Makefile=38;5;155:*NOTICE=38;5;220;1:*PATENTS=38;5;220;1:*PkgInfo=38;5;239:*README=38;5;220;1:*README.md=38;5;220;1:*README.rst=38;5;220;1:*VERSION=38;5;220;1:*authorized_keys=1:*cfg=1:*conf=1:*config=1:*core=38;5;241:*id_dsa=38;5;192;3:*id_ecdsa=38;5;192;3:*id_ed25519=38;5;192;3:*id_rsa=38;5;192;3:*known_hosts=1:*lock=38;5;248:*lockfile=38;5;248:*pm_to_blib=38;5;240:*rc=1:*.1p=38;5;7:*.32x=38;5;213:*.3g2=38;5;115:*.3ga=38;5;137;1:*.3gp=38;5;115:*.3p=38;5;7:*.82p=38;5;121:*.83p=38;5;121:*.8eu=38;5;121:*.8xe=38;5;121:*.8xp=38;5;121:*.A64=38;5;213:*.BAT=38;5;172:*.BUP=38;5;241:*.C=38;5;81:*.CFUserTextEncoding=38;5;239:*.DS_Store=38;5;239:*.F=38;5;81:*.F03=38;5;81:*.F08=38;5;81:*.F90=38;5;81:*.F95=38;5;81:*.H=38;5;110:*.IFO=38;5;114:*.JPG=38;5;97:*.M=38;5;110:*.MOV=38;5;114:*.PDF=38;5;141:*.PFA=38;5;66:*.PL=38;5;160:*.R=38;5;49:*.RData=38;5;178:*.Rproj=38;5;11:*.S=38;5;110:*.S3M=38;5;137;1:*.SKIP=38;5;244:*.TIFF=38;5;97:*.VOB=38;5;115;1:*.a00=38;5;213:*.a52=38;5;213:*.a64=38;5;213:*.a78=38;5;213:*.aac=38;5;137;1:*.accdb=38;5;60:*.accde=38;5;60:*.accdr=38;5;60:*.accdt=38;5;60:*.adf=38;5;213:*.adoc=38;5;184:*.afm=38;5;66:*.agda=38;5;81:*.agdai=38;5;110:*.ahk=38;5;41:*.ai=38;5;99:*.aiff=38;5;136;1:*.alac=38;5;136;1:*.allow=38;5;112:*.am=38;5;242:*.amr=38;5;137;1:*.ape=38;5;136;1:*.apk=38;5;215:*.application=38;5;116:*.aria2=38;5;241:*.asc=38;5;192;3:*.asciidoc=38;5;184:*.asf=38;5;115:*.asm=38;5;81:*.ass=38;5;117:*.atr=38;5;213:*.au=38;5;137;1:*.automount=38;5;45:*.avi=38;5;114:*.awk=38;5;172:*.bak=38;5;241:*.bash=38;5;172:*.bash_login=1:*.bash_logout=1:*.bash_profile=1:*.bat=38;5;172:*.bfe=38;5;192;3:*.bib=38;5;178:*.bin=38;5;124:*.bmp=38;5;97:*.bsp=38;5;215:*.c=38;5;81:*.c++=38;5;81:*.cab=38;5;215:*.caf=38;5;137;1:*.cap=38;5;29:*.car=38;5;57:*.cbr=38;5;141:*.cbz=38;5;141:*.cc=38;5;81:*.cda=38;5;136;1:*.cdi=38;5;213:*.cdr=38;5;97:*.chm=38;5;141:*.cl=38;5;81:*.clj=38;5;41:*.cljc=38;5;41:*.cljs=38;5;41:*.cljw=38;5;41:*.cnc=38;5;7:*.coffee=38;5;074;1:*.cp=38;5;81:*.cpp=38;5;81:*.cr=38;5;81:*.crx=38;5;215:*.cs=38;5;81:*.css=38;5;125;1:*.csv=38;5;78:*.ctp=38;5;81:*.cue=38;5;116:*.cxx=38;5;81:*.dart=38;5;51:*.dat=38;5;137;1:*.db=38;5;60:*.deb=38;5;215:*.def=38;5;7:*.deny=38;5;196:*.description=38;5;116:*.device=38;5;45:*.dhall=38;5;178:*.dicom=38;5;97:*.diff=48;5;197;38;5;232:*.directory=38;5;116:*.divx=38;5;114:*.djvu=38;5;141:*.dll=38;5;241:*.dmg=38;5;215:*.dmp=38;5;29:*.doc=38;5;111:*.dockerignore=38;5;240:*.docm=38;5;111;4:*.docx=38;5;111:*.drw=38;5;99:*.dtd=38;5;178:*.dts=38;5;137;1:*.dump=38;5;241:*.dwg=38;5;216:*.dylib=38;5;241:*.ear=38;5;215:*.el=38;5;81:*.elc=38;5;241:*.eln=38;5;241:*.eml=38;5;125;1:*.enc=38;5;192;3:*.entitlements=1:*.epf=1:*.eps=38;5;99:*.epsf=38;5;99:*.epub=38;5;141:*.err=38;5;160;1:*.error=38;5;160;1:*.etx=38;5;184:*.ex=38;5;7:*.example=38;5;7:*.f=38;5;81:*.f03=38;5;81:*.f08=38;5;81:*.f4v=38;5;115:*.f90=38;5;81:*.f95=38;5;81:*.fcm=38;5;137;1:*.feature=38;5;7:*.flac=38;5;136;1:*.flif=38;5;97:*.flv=38;5;115:*.fm2=38;5;213:*.fmp12=38;5;60:*.fnt=38;5;66:*.fon=38;5;66:*.for=38;5;81:*.fp7=38;5;60:*.ftn=38;5;81:*.fvd=38;5;124:*.fxml=38;5;178:*.gb=38;5;213:*.gba=38;5;213:*.gbc=38;5;213:*.gbr=38;5;7:*.gel=38;5;213:*.gemspec=38;5;41:*.ger=38;5;7:*.gg=38;5;213:*.ggl=38;5;213:*.gif=38;5;97:*.git=38;5;197:*.gitattributes=38;5;240:*.gitignore=38;5;240:*.gitmodules=38;5;240:*.go=38;5;81:*.gp3=38;5;115:*.gp4=38;5;115:*.gpg=38;5;192;3:*.gs=38;5;81:*.h=38;5;110:*.h++=38;5;110:*.hi=38;5;110:*.hidden-color-scheme=1:*.hidden-tmTheme=1:*.hin=38;5;242:*.hpp=38;5;110:*.hs=38;5;81:*.htm=38;5;125;1:*.html=38;5;125;1:*.hxx=38;5;110:*.icns=38;5;97:*.ico=38;5;97:*.ics=38;5;7:*.ii=38;5;110:*.img=38;5;124:*.iml=38;5;166:*.in=38;5;242:*.info=38;5;184:*.ini=1:*.ipa=38;5;215:*.ipk=38;5;213:*.ipynb=38;5;41:*.iso=38;5;124:*.j64=38;5;213:*.jad=38;5;215:*.jar=38;5;215:*.java=38;5;074;1:*.jhtm=38;5;125;1:*.jpeg=38;5;97:*.jpg=38;5;97:*.js=38;5;074;1:*.jsm=38;5;074;1:*.json=38;5;178:*.jsonl=38;5;178:*.jsonnet=38;5;178:*.jsp=38;5;074;1:*.jxl=38;5;97:*.kak=38;5;172:*.key=38;5;166:*.lagda=38;5;81:*.lagda.md=38;5;81:*.lagda.rst=38;5;81:*.lagda.tex=38;5;81:*.last-run=1:*.less=38;5;125;1:*.lhs=38;5;81:*.libsonnet=38;5;142:*.lisp=38;5;81:*.lnk=38;5;39:*.localized=38;5;239:*.localstorage=38;5;60:*.log=38;5;190:*.lua=38;5;81:*.m=38;5;110:*.m2v=38;5;114:*.m3u=38;5;116:*.m3u8=38;5;116:*.m4=38;5;242:*.m4a=38;5;137;1:*.m4v=38;5;114:*.map=38;5;7:*.markdown=38;5;184:*.md=38;5;184:*.md5=38;5;116:*.mdb=38;5;60:*.mde=38;5;60:*.mdump=38;5;241:*.merged-ca-bundle=1:*.mf=38;5;7:*.mfasl=38;5;7:*.mht=38;5;125;1:*.mi=38;5;7:*.mid=38;5;136;1:*.midi=38;5;136;1:*.mjs=38;5;074;1:*.mkd=38;5;184:*.mkv=38;5;114:*.mm=38;5;7:*.mobi=38;5;141:*.mod=38;5;137;1:*.moon=38;5;81:*.mount=38;5;45:*.mov=38;5;114:*.mp3=38;5;137;1:*.mp4=38;5;114:*.mp4a=38;5;137;1:*.mpeg=38;5;114:*.mpg=38;5;114:*.msg=38;5;178:*.msql=38;5;222:*.mtx=38;5;7:*.mustache=38;5;125;1:*.mysql=38;5;222:*.nc=38;5;60:*.ndjson=38;5;178:*.nds=38;5;213:*.nes=38;5;213:*.nfo=38;5;184:*.nib=38;5;57:*.nim=38;5;81:*.nimble=38;5;81:*.nix=38;5;155:*.nrg=38;5;124:*.nth=38;5;97:*.numbers=38;5;112:*.o=38;5;241:*.odb=38;5;111:*.odp=38;5;166:*.ods=38;5;112:*.odt=38;5;111:*.oga=38;5;137;1:*.ogg=38;5;137;1:*.ogm=38;5;114:*.ogv=38;5;115:*.old=38;5;242:*.opus=38;5;137;1:*.org=38;5;184:*.orig=38;5;241:*.otf=38;5;66:*.out=38;5;242:*.p12=38;5;192;3:*.p7s=38;5;192;3:*.pacnew=38;5;33:*.pages=38;5;111:*.pak=38;5;215:*.part=38;5;239:*.patch=48;5;197;38;5;232;1:*.path=38;5;45:*.pbxproj=1:*.pc=38;5;7:*.pcap=38;5;29:*.pcb=38;5;7:*.pcf=1:*.pcm=38;5;136;1:*.pdf=38;5;141:*.pem=38;5;192;3:*.pfa=38;5;66:*.pfb=38;5;66:*.pfm=38;5;66:*.pgn=38;5;178:*.pgp=38;5;192;3:*.pgsql=38;5;222:*.php=38;5;81:*.pi=38;5;7:*.pid=38;5;248:*.pk3=38;5;215:*.pl=38;5;208:*.plist=1:*.plt=38;5;7:*.ply=38;5;216:*.pm=38;5;203:*.png=38;5;97:*.pod=38;5;184:*.pot=38;5;7:*.pps=38;5;166:*.ppt=38;5;166:*.ppts=38;5;166:*.pptsm=38;5;166;4:*.pptx=38;5;166:*.pptxm=38;5;166;4:*.profile=1:*.properties=38;5;116:*.ps=38;5;99:*.psd=38;5;97:*.psf=1:*.pxd=38;5;97:*.pxm=38;5;97:*.py=38;5;41:*.pyc=38;5;240:*.qcow=38;5;124:*.r=38;5;49:*.r[0-9]{0,2}=38;5;239:*.rake=38;5;155:*.rb=38;5;41:*.rdata=38;5;178:*.rdf=38;5;7:*.rkt=38;5;81:*.rlib=38;5;241:*.rmvb=38;5;114:*.rnc=38;5;178:*.rng=38;5;178:*.rom=38;5;213:*.rpm=38;5;215:*.rs=38;5;81:*.rss=38;5;178:*.rst=38;5;184:*.rstheme=1:*.rtf=38;5;111:*.ru=38;5;7:*.s=38;5;110:*.s3m=38;5;137;1:*.sample=38;5;114:*.sass=38;5;125;1:*.sassc=38;5;244:*.sav=38;5;213:*.sc=38;5;41:*.scala=38;5;41:*.scan=38;5;242:*.sch=38;5;7:*.scm=38;5;7:*.scpt=38;5;219:*.scss=38;5;125;1:*.sed=38;5;172:*.service=38;5;45:*.sfv=38;5;116:*.sgml=38;5;178:*.sh=38;5;172:*.sid=38;5;137;1:*.sig=38;5;192;3:*.signature=38;5;192;3:*.sis=38;5;7:*.sms=38;5;213:*.snapshot=38;5;45:*.socket=38;5;45:*.sparseimage=38;5;124:*.spl=38;5;7:*.sql=38;5;222:*.sqlite=38;5;60:*.srt=38;5;117:*.ssa=38;5;117:*.st=38;5;213:*.stackdump=38;5;241:*.state=38;5;248:*.stderr=38;5;160;1:*.stl=38;5;216:*.storyboard=38;5;196:*.strings=1:*.sty=38;5;7:*.sub=38;5;117:*.sublime-build=1:*.sublime-commands=1:*.sublime-keymap=1:*.sublime-project=1:*.sublime-settings=1:*.sublime-snippet=1:*.sublime-workspace=1:*.sug=38;5;7:*.sup=38;5;117:*.svg=38;5;99:*.swap=38;5;45:*.swift=38;5;219:*.swo=38;5;244:*.swp=38;5;244:*.sx=38;5;81:*.t=38;5;114:*.target=38;5;45:*.tcc=38;5;110:*.tcl=38;5;64;1:*.tdy=38;5;7:*.tex=38;5;184:*.textile=38;5;184:*.tf=38;5;168:*.tfm=38;5;7:*.tfnt=38;5;7:*.tfstate=38;5;168:*.tfvars=38;5;168:*.tg=38;5;7:*.theme=38;5;116:*.tif=38;5;97:*.tiff=38;5;97:*.timer=38;5;45:*.tmTheme=1:*.tmp=38;5;244:*.toast=38;5;124:*.toml=38;5;178:*.torrent=38;5;116:*.ts=38;5;115:*.tsv=38;5;78:*.ttf=38;5;66:*.twig=38;5;81:*.txt=38;5;253:*.typelib=38;5;60:*.un~=38;5;241:*.urlview=38;5;116:*.user-ca-bundle=1:*.v=38;5;81:*.vala=38;5;81:*.vapi=38;5;81:*.vb=38;5;81:*.vba=38;5;81:*.vbs=38;5;81:*.vcard=38;5;7:*.vcd=38;5;124:*.vcf=38;5;7:*.vdf=38;5;215:*.vdi=38;5;124:*.vfd=38;5;124:*.vhd=38;5;124:*.vhdx=38;5;124:*.vim=38;5;172:*.viminfo=1:*.vmdk=38;5;124:*.vob=38;5;115;1:*.vpk=38;5;215:*.vtt=38;5;117:*.war=38;5;215:*.wav=38;5;136;1:*.webloc=38;5;116:*.webm=38;5;115:*.webp=38;5;97:*.wma=38;5;137;1:*.wmv=38;5;114:*.woff=38;5;66:*.woff2=38;5;66:*.wrl=38;5;216:*.wv=38;5;136;1:*.wvc=38;5;136;1:*.xcconfig=1:*.xcf=38;5;7:*.xcsettings=1:*.xcuserstate=1:*.xcworkspacedata=1:*.xib=38;5;208:*.xla=38;5;76:*.xln=38;5;7:*.xls=38;5;112:*.xlsx=38;5;112:*.xlsxm=38;5;112;4:*.xltm=38;5;73;4:*.xltx=38;5;73:*.xml=38;5;178:*.xpi=38;5;215:*.xpm=38;5;97:*.xsd=38;5;178:*.xsh=38;5;41:*.yaml=38;5;178:*.yml=38;5;178:*.z[0-9]{0,2}=38;5;239:*.zcompdump=38;5;241:*.zig=38;5;81:*.zlogin=1:*.zlogout=1:*.zprofile=1:*.zsh=38;5;172:*.zshenv=1:*.zwc=38;5;241:*.zx[0-9]{0,2}=38;5;239:bd=38;5;68:ca=38;5;17:cd=38;5;113;1:di=38;5;30:do=38;5;127:ex=38;5;208;1:pi=38;5;126:fi=0:ln=target:mh=38;5;222;1:no=0:or=48;5;196;38;5;232;1:ow=38;5;220;1:sg=48;5;3;38;5;0:su=38;5;220;1;3;100;1:so=38;5;197:st=38;5;86;48;5;234:tw=48;5;235;38;5;139;3: POSH_SHELL_VERSION=5.1.16(1)-release WAYLAND_DISPLAY=wayland-0 _Z_NO_RESOLVE_SYMLINKS=1 CONDA_PROMPT_MODIFIER=false CLICOLOR=1 INFOPATH=/home/linuxbrew/.linuxbrew/share/info:/home/linuxbrew/.linuxbrew/share/info: TERM=xterm-256color ASDF_DIR=/home/jacktose/.asdf USER=jacktose HOMEBREW_CELLAR=/home/linuxbrew/.linuxbrew/Cellar MANPAGER=sh -c 'col -bx | batcat --plain --language=man' VISUAL=vim DISPLAY=:0 SHLVL=1 HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew/Homebrew ATUIN_SESSION=018e20331f1474ddb68d0d51232e701b POSH_THEME= HOMEBREW_GITHUB_API_TOKEN=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 ATUIN_HISTORY_ID=__bash_preexec_failure__ XDG_RUNTIME_DIR=/run/user/1000/ WSLENV=WT_SESSION:WT_PROFILE_ID: XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop PATH=/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/jacktose/.local/bin:/home/jacktose/.asdf/shims:/home/jacktose/.asdf/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/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/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/Vim/:/mnt/c/Program Files/Vim/vim91:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/PuTTY/:/mnt/c/Program Files/PowerShell/7/:/mnt/c/Program Files/qpdf 11.6.3/bin/:/mnt/c/Program Files/Yubico/YubiKey Manager CLI/:/mnt/c/Program Files/Git/cmd:/mnt/c/Users/jacktose/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/jacktose/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/jacktose/AppData/Local/Microsoft/WinGet/Links:/mnt/c/Users/jacktose/AppData/Local/Microsoft/WinGet/Packages/AgileBits.1Password.CLI_Microsoft.Winget.Source_8wekyb3d8bbwe/:/mnt/c/Users/jacktose/AppData/Local/Programs/oh-my-posh/bin:/snap/bin DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus HOSTTYPE=x86_64 POWERLINE_COMMAND=oh-my-posh PULSE_SERVER=unix:/mnt/wslg/PulseServer WT_PROFILE_ID={51855cb2-8cce-5362-8f54-464b92b32386} OLDPWD=/home/jacktose _Z_OWNER=jacktose _=/home/linuxbrew/.linuxbrew/bin/oh-my-posh] [TRACE] 15:52:16.189 shell.go:GOOS() - 51ns [DEBUG] 15:52:16.189 shell.go:Pwd:428 → /home/jacktose/.config/oh-my-posh [TRACE] 15:52:16.189 shell.go:Pwd() - 8.154µs [TRACE] 15:52:16.189 shell.go:GOOS() - 45ns [TRACE] 15:52:16.189 shell.go:GOOS() - 33ns [TRACE] 15:52:16.189 shell.go:GOOS() - 19ns [TRACE] 15:52:16.189 shell.go:GOOS() - 20ns [TRACE] 15:52:16.189 shell.go:GOOS() - 19ns [TRACE] 15:52:16.189 shell.go:GOOS() - 20ns [TRACE] 15:52:16.189 shell.go:GOOS() - 20ns [TRACE] 15:52:16.189 shell.go:GOOS() - 20ns [TRACE] 15:52:16.189 shell.go:GOOS() - 19ns [TRACE] 15:52:16.189 shell.go:GOOS() - 20ns [TRACE] 15:52:16.189 shell.go:GOOS() - 20ns [TRACE] 15:52:16.189 shell.go:GOOS() - 20ns [DEBUG] 15:52:16.189 shell.go:User:563 → jacktose [TRACE] 15:52:16.189 shell.go:User() - 1.753µs [DEBUG] 15:52:16.189 shell.go:Host:575 → jacktose-2 [TRACE] 15:52:16.189 shell.go:Host() - 2.721µs [TRACE] 15:52:16.189 shell.go:GOOS() - 20ns [DEBUG] 15:52:16.189 shell_unix.go:Platform:87 → ubuntu [DEBUG] 15:52:16.189 shell.go:Getenv:398 → 1 [TRACE] 15:52:16.189 shell.go:Getenv(SHLVL) - 1.65µs [TRACE] 15:52:16.189 shell.go:TemplateCache() - 83.213µs [DEBUG] 15:52:16.189 shell.go:Getenv:398 → NO DATA [TRACE] 15:52:16.189 shell.go:Getenv(POSH_CURSOR_LINE) - 1.45µs [DEBUG] 15:52:16.189 shell.go:Getenv:398 → NO DATA [TRACE] 15:52:16.189 shell.go:Getenv(POSH_CURSOR_COLUMN) - 1.37µs [TRACE] 15:52:16.189 shell.go:Flags() - 52ns [TRACE] 15:52:16.189 shell.go:Flags() - 20ns [TRACE] 15:52:16.189 shell.go:Shell() - 62ns [TRACE] 15:52:16.189 shell.go:Shell() - 20ns [TRACE] 15:52:16.189 shell.go:Flags() - 57ns [DEBUG] 15:52:16.189 properties.go:GetString:28 → {{ .Code }} [TRACE] 15:52:16.189 shell.go:Pwd() - 73ns [TRACE] 15:52:16.189 shell.go:GOOS() - 39ns [DEBUG] 15:52:16.189 segment.go:SetEnabled:526 → Segment: Status [TRACE] 15:52:16.189 shell.go:StatusCodes() - 48ns [DEBUG] 15:52:16.189 text.go:Render:70 → Rendering template: {{ .Code }} [TRACE] 15:52:16.189 shell.go:Pwd() - 102ns [TRACE] 15:52:16.189 shell.go:GOOS() - 39ns [DEBUG] 15:52:16.189 segment.go:SetEnabled:526 → Segment: Path [TRACE] 15:52:16.189 shell.go:Flags() - 154ns [TRACE] 15:52:16.189 shell.go:Pwd() - 42ns [TRACE] 15:52:16.189 shell.go:Shell() - 51ns [TRACE] 15:52:16.189 shell.go:Shell() - 23ns [TRACE] 15:52:16.189 shell.go:Flags() - 61ns [TRACE] 15:52:16.189 shell.go:Pwd() - 100ns [TRACE] 15:52:16.189 shell.go:GOOS() - 61ns [DEBUG] 15:52:16.189 segment.go:SetEnabled:526 → Segment: Session [DEBUG] 15:52:16.189 shell.go:Getenv:398 → NO DATA [TRACE] 15:52:16.189 shell.go:Getenv(SSH_CONNECTION) - 2.307µs [DEBUG] 15:52:16.189 shell.go:Getenv:398 → NO DATA [TRACE] 15:52:16.189 shell.go:Getenv(SSH_CLIENT) - 4.128µs [DEBUG] 15:52:16.189 shell_unix.go:Platform:87 → ubuntu [DEBUG] 15:52:16.189 properties.go:GetBool:22 → mapped_locations_enabled: true [DEBUG] 15:52:16.190 properties.go:GetString:28 →  [DEBUG] 15:52:16.190 properties.go:GetString:28 →  [TRACE] 15:52:16.190 shell.go:GOOS() - 43ns [DEBUG] 15:52:16.190 properties.go:GetString:28 → ~ [TRACE] 15:52:16.190 shell.go:Pwd() - 90ns [TRACE] 15:52:16.190 shell.go:GOOS() - 38ns [DEBUG] 15:52:16.190 segment.go:SetEnabled:526 → Segment: Root [TRACE] 15:52:16.190 shell_unix.go:Root() - 162ns [TRACE] 15:52:16.190 shell.go:Flags() - 162ns [TRACE] 15:52:16.190 shell.go:Pwd() - 160ns [TRACE] 15:52:16.190 shell.go:GOOS() - 40ns [DEBUG] 15:52:16.190 segment.go:SetEnabled:526 → Segment: Git [DEBUG] 15:52:16.190 shell_unix.go:IsWsl:35 → true [TRACE] 15:52:16.190 shell_unix.go:IsWsl() - 5.275µs [DEBUG] 15:52:16.190 shell.go:FileContent:537 ↓ 5.15.133.1-microsoft-standard-WSL2 [TRACE] 15:52:16.190 shell.go:FileContent(/proc/sys/kernel/osrelease) - 19.607µs [TRACE] 15:52:16.190 shell_unix.go:IsWsl2() - 29.28µs [TRACE] 15:52:16.190 shell.go:Pwd() - 45ns [DEBUG] 15:52:16.190 shell.go:RunCommand:593 → NO DATA [TRACE] 15:52:16.190 shell.go:RunCommand(who am i) - 701.297µs [DEBUG] 15:52:16.190 properties.go:GetKeyValueMap:46 → mapped_locations: map[] [TRACE] 15:52:16.190 shell.go:PathSeparator() - 116ns [TRACE] 15:52:16.190 shell.go:GOOS() - 68ns [TRACE] 15:52:16.190 shell.go:GOOS() - 38ns [TRACE] 15:52:16.190 shell.go:TemplateCache() - 151ns [TRACE] 15:52:16.190 shell.go:TemplateCache() - 232ns [DEBUG] 15:52:16.190 properties.go:GetBool:22 → always_enabled: true [TRACE] 15:52:16.190 shell.go:TemplateCache() - 75ns [TRACE] 15:52:16.191 shell.go:GOOS() - 146ns [TRACE] 15:52:16.191 shell.go:GOOS() - 52ns [TRACE] 15:52:16.191 shell.go:PathSeparator() - 55ns [TRACE] 15:52:16.191 shell.go:PathSeparator() - 48ns [TRACE] 15:52:16.191 shell.go:GOOS() - 46ns [TRACE] 15:52:16.191 shell.go:GOOS() - 48ns [TRACE] 15:52:16.191 shell.go:PathSeparator() - 40ns [TRACE] 15:52:16.191 shell.go:GOOS() - 37ns [TRACE] 15:52:16.191 shell.go:GOOS() - 21ns [TRACE] 15:52:16.191 shell.go:PathSeparator() - 22ns [TRACE] 15:52:16.191 shell.go:GOOS() - 21ns [TRACE] 15:52:16.191 shell.go:GOOS() - 24ns [TRACE] 15:52:16.191 shell.go:PathSeparator() - 25ns [TRACE] 15:52:16.191 shell.go:PathSeparator() - 24ns [DEBUG] 15:52:16.191 properties.go:GetString:28 → folder [TRACE] 15:52:16.191 shell.go:GOOS() - 26ns [TRACE] 15:52:16.191 shell.go:GOOS() - 27ns [TRACE] 15:52:16.191 shell.go:GOOS() - 29ns [TRACE] 15:52:16.191 shell.go:GOOS() - 22ns [TRACE] 15:52:16.191 shell.go:GOOS() - 21ns [TRACE] 15:52:16.191 shell.go:GOOS() - 22ns [TRACE] 15:52:16.191 shell.go:GOOS() - 21ns [TRACE] 15:52:16.191 shell.go:GOOS() - 21ns [TRACE] 15:52:16.191 shell.go:GOOS() - 22ns [TRACE] 15:52:16.191 shell.go:GOOS() - 24ns [TRACE] 15:52:16.191 shell.go:GOOS() - 20ns [TRACE] 15:52:16.191 shell.go:PathSeparator() - 50ns [DEBUG] 15:52:16.191 properties.go:GetString:28 → NO DATA [TRACE] 15:52:16.191 shell.go:PathSeparator() - 28ns [DEBUG] 15:52:16.191 properties.go:GetString:28 → / [TRACE] 15:52:16.191 shell.go:Pwd() - 99ns [DEBUG] 15:52:16.191 shell_unix.go:IsWsl:35 → true [TRACE] 15:52:16.191 shell_unix.go:IsWsl() - 2.659µs [DEBUG] 15:52:16.191 shell.go:RunCommand:593 → //wsl.localhost/Ubuntu/home/jacktose/.config/oh-my-posh [TRACE] 15:52:16.191 shell.go:RunCommand(wslpath -m /home/jacktose/.config/oh-my-posh) - 860.872µs [TRACE] 15:52:16.191 shell.go:GOOS() - 46ns [DEBUG] 15:52:16.191 shell.go:CommandPath:615 → /usr/bin/git [TRACE] 15:52:16.191 shell.go:CommandPath(git) - 16.581µs [TRACE] 15:52:16.191 shell.go:HasCommand(git) - 18.689µs [TRACE] 15:52:16.191 shell.go:Pwd() - 85ns [ERROR] 15:52:16.191 shell.go:HasParentFilePath:759 → stat .git: no such file or directory [TRACE] 15:52:16.191 shell.go:HasParentFilePath(.git) - 10.78µs [DEBUG] 15:52:16.191 properties.go:GetBool:22 → fetch_bare_info: false [DEBUG] 15:52:16.191 shell.go:RunCommand:593 → //wsl.localhost/Ubuntu/home/jacktose/.config/oh-my-posh [TRACE] 15:52:16.191 shell.go:RunCommand(wslpath -m /home/jacktose/.config/oh-my-posh) - 424.337µs [TRACE] 15:52:16.191 shell.go:StackCount() - 120ns [TRACE] 15:52:16.191 shell_unix.go:DirIsWritable(/home/jacktose/.config/oh-my-posh) - 2.353µs [TRACE] 15:52:16.191 shell.go:TemplateCache() - 257ns [DEBUG] 15:52:16.191 text.go:Render:70 → Rendering template: {{ if gt .Code 0 }}{{ else }}{{ end }} [DEBUG] 15:52:16.191 text.go:Render:70 → Rendering template:  {{ path .Path .Location }} [DEBUG] 15:52:16.191 text.go:Render:70 → Rendering template: {{ if .SSHSession }} {{ end }}{{ .UserName }} [TRACE] 15:52:16.191 shell.go:TemplateCache() - 86ns [TRACE] 15:52:16.191 shell.go:Shell() - 80ns [TRACE] 15:52:16.191 shell.go:TemplateCache() - 223ns [TRACE] 15:52:16.191 shell.go:Shell() - 87ns [TRACE] 15:52:16.191 shell.go:TemplateCache() - 224ns [TRACE] 15:52:16.191 shell.go:Shell() - 67ns [DEBUG] 15:52:16.191 text.go:Render:70 → Rendering template: diamond [DEBUG] 15:52:16.191 text.go:Render:70 → Rendering template: powerline [DEBUG] 15:52:16.191 text.go:Render:70 → Rendering template: powerline [DEBUG] 15:52:16.191 text.go:Render:70 → Rendering template: powerline [DEBUG] 15:52:16.191 text.go:Render:70 → Rendering template: {{ if gt .Code 0 }}p:red{{ end }} [TRACE] 15:52:16.191 shell.go:TemplateCache() - 182ns [DEBUG] 15:52:16.191 text.go:Render:70 → Rendering template: diamond [TRACE] 15:52:16.191 shell.go:Shell() - 104ns [TRACE] 15:52:16.191 shell.go:Shell() - 56ns [TRACE] 15:52:16.191 shell.go:Shell() - 25ns [TRACE] 15:52:16.191 shell.go:Shell() - 22ns [DEBUG] 15:52:16.191 shell.go:Getenv:398 → NO DATA [TRACE] 15:52:16.191 shell.go:Getenv(OMP_CACHE_DISABLED) - 2.219µs [TRACE] 15:52:16.191 shell.go:Flags() - 36ns [TRACE] 15:52:16.191 shell.go:Flags() - 70ns [TRACE] 15:52:16.192 shell.go:Flags() - 49ns [TRACE] 15:52:16.192 shell.go:Flags() - 64ns [TRACE] 15:52:16.192 shell.go:Pwd() - 117ns [TRACE] 15:52:16.192 shell.go:Pwd() - 118ns [TRACE] 15:52:16.192 shell.go:GOOS() - 46ns [TRACE] 15:52:16.192 shell.go:GOOS() - 41ns [DEBUG] 15:52:16.192 segment.go:SetEnabled:526 → Segment: Time [DEBUG] 15:52:16.192 segment.go:SetEnabled:526 → Segment: Go [DEBUG] 15:52:16.192 properties.go:GetString:28 → 15:04:05 [TRACE] 15:52:16.192 shell.go:TemplateCache() - 122ns [TRACE] 15:52:16.192 shell.go:Flags() - 22ns [TRACE] 15:52:16.192 shell.go:Pwd() - 48ns [TRACE] 15:52:16.192 shell.go:GOOS() - 35ns [DEBUG] 15:52:16.192 segment.go:SetEnabled:526 → Segment: Node [TRACE] 15:52:16.192 shell.go:Flags() - 38ns [TRACE] 15:52:16.192 shell.go:Pwd() - 70ns [TRACE] 15:52:16.192 shell.go:GOOS() - 37ns [DEBUG] 15:52:16.192 properties.go:GetStringArray:52 → extensions: [*.js *.ts package.json .nvmrc pnpm-workspace.yaml .pnpmfile.cjs .npmrc .vue] [DEBUG] 15:52:16.192 segment.go:SetEnabled:526 → Segment: Shell [DEBUG] 15:52:16.192 properties.go:GetStringArray:52 → folders: [] [DEBUG] 15:52:16.192 properties.go:GetString:28 → files [DEBUG] 15:52:16.192 properties.go:GetBool:22 → home_enabled: false [DEBUG] 15:52:16.192 properties.go:GetKeyValueMap:46 → mapped_shell_names: map[] [TRACE] 15:52:16.192 shell.go:Pwd() - 78ns [TRACE] 15:52:16.192 shell.go:GOOS() - 39ns [TRACE] 15:52:16.192 shell.go:Shell() - 66ns [TRACE] 15:52:16.192 shell.go:Flags() - 44ns [DEBUG] 15:52:16.192 segment.go:SetEnabled:526 → Segment: Python [TRACE] 15:52:16.192 shell.go:TemplateCache() - 139ns [DEBUG] 15:52:16.192 properties.go:GetStringArray:52 → extensions: [*.py *.ipynb pyproject.toml venv.bak] [DEBUG] 15:52:16.192 properties.go:GetStringArray:52 → folders: [.venv venv virtualenv venv-win pyenv-win] [DEBUG] 15:52:16.192 properties.go:GetStringArray:52 → extensions: [*.go go.mod] [TRACE] 15:52:16.192 shell.go:Pwd() - 41ns [DEBUG] 15:52:16.192 properties.go:GetBool:22 → home_enabled: false [DEBUG] 15:52:16.192 properties.go:GetStringArray:52 → folders: [] [TRACE] 15:52:16.192 shell.go:Pwd() - 52ns [DEBUG] 15:52:16.192 properties.go:GetString:28 → files [DEBUG] 15:52:16.192 properties.go:GetBool:22 → home_enabled: false [DEBUG] 15:52:16.192 properties.go:GetBool:22 → fetch_virtual_env: false [TRACE] 15:52:16.192 shell.go:Pwd() - 34ns [DEBUG] 15:52:16.192 properties.go:GetBool:22 → fetch_package_manager: false [TRACE] 15:52:16.192 shell.go:Pwd() - 47ns [TRACE] 15:52:16.192 shell.go:Pwd() - 41ns [DEBUG] 15:52:16.192 properties.go:GetString:28 → files [TRACE] 15:52:16.192 shell.go:Pwd() - 33ns [DEBUG] 15:52:16.192 shell.go:HasFiles:464 → false [DEBUG] 15:52:16.192 shell.go:HasFiles:464 → false [TRACE] 15:52:16.192 shell.go:HasFiles(*.go) - 52.742µs [DEBUG] 15:52:16.192 shell.go:HasFiles:464 → false [TRACE] 15:52:16.192 shell.go:HasFiles(*.py) - 57.968µs [TRACE] 15:52:16.192 shell.go:Pwd() - 55ns [TRACE] 15:52:16.192 shell.go:Pwd() - 53ns [TRACE] 15:52:16.192 shell.go:HasFiles(*.js) - 58.799µs [TRACE] 15:52:16.192 shell.go:Pwd() - 53ns [DEBUG] 15:52:16.192 shell.go:HasFiles:464 → false [DEBUG] 15:52:16.192 shell.go:HasFiles:464 → false [DEBUG] 15:52:16.192 shell.go:HasFiles:464 → false [TRACE] 15:52:16.192 shell.go:HasFiles(go.mod) - 12.69µs [TRACE] 15:52:16.192 shell.go:HasFiles(*.ipynb) - 10.956µs [TRACE] 15:52:16.192 shell.go:Pwd() - 32ns [TRACE] 15:52:16.192 shell.go:HasFiles(*.ts) - 11.166µs [TRACE] 15:52:16.192 shell.go:Pwd() - 33ns [DEBUG] 15:52:16.192 shell.go:HasFiles:464 → false [TRACE] 15:52:16.192 shell.go:HasFiles(package.json) - 10.753µs [DEBUG] 15:52:16.192 shell.go:HasFiles:464 → false [TRACE] 15:52:16.192 shell.go:Pwd() - 41ns [TRACE] 15:52:16.192 shell.go:HasFiles(pyproject.toml) - 15.099µs [TRACE] 15:52:16.192 shell.go:Pwd() - 41ns [DEBUG] 15:52:16.192 shell.go:HasFiles:464 → false [DEBUG] 15:52:16.192 shell.go:HasFiles:464 → false [TRACE] 15:52:16.192 shell.go:HasFiles(.nvmrc) - 8.505µs [TRACE] 15:52:16.192 shell.go:Pwd() - 34ns [TRACE] 15:52:16.192 shell.go:HasFiles(venv.bak) - 8.785µs [DEBUG] 15:52:16.192 shell.go:HasFolder:507 → false [TRACE] 15:52:16.192 shell.go:HasFolder(.venv) - 3.203µs [DEBUG] 15:52:16.192 shell.go:HasFiles:464 → false [DEBUG] 15:52:16.192 shell.go:HasFolder:507 → false [TRACE] 15:52:16.192 shell.go:HasFiles(pnpm-workspace.yaml) - 9.003µs [TRACE] 15:52:16.192 shell.go:HasFolder(venv) - 2.291µs [TRACE] 15:52:16.192 shell.go:Pwd() - 33ns [DEBUG] 15:52:16.192 shell.go:HasFolder:507 → false [TRACE] 15:52:16.192 shell.go:HasFolder(virtualenv) - 3.744µs [DEBUG] 15:52:16.192 shell.go:HasFolder:507 → false [DEBUG] 15:52:16.192 shell.go:HasFiles:464 → false [TRACE] 15:52:16.192 shell.go:HasFolder(venv-win) - 2.028µs [TRACE] 15:52:16.192 shell.go:HasFiles(.pnpmfile.cjs) - 9.561µs [DEBUG] 15:52:16.192 shell.go:HasFolder:507 → false [TRACE] 15:52:16.192 shell.go:Pwd() - 33ns [TRACE] 15:52:16.192 shell.go:HasFolder(pyenv-win) - 1.905µs [DEBUG] 15:52:16.192 shell.go:HasFiles:464 → false [TRACE] 15:52:16.192 shell.go:HasFiles(.npmrc) - 7.734µs [TRACE] 15:52:16.192 shell.go:Pwd() - 33ns [DEBUG] 15:52:16.192 shell.go:HasFiles:464 → false [TRACE] 15:52:16.192 shell.go:HasFiles(.vue) - 7.443µs [DEBUG] 15:52:16.192 text.go:Render:70 → Rendering template: at {{ .CurrentDate | date "15:04:05" }} [DEBUG] 15:52:16.192 text.go:Render:70 → Rendering template: in {{ .Name }} [TRACE] 15:52:16.192 shell.go:TemplateCache() - 296ns [TRACE] 15:52:16.192 shell.go:Shell() - 107ns [TRACE] 15:52:16.192 shell.go:TemplateCache() - 1.186µs [TRACE] 15:52:16.192 shell.go:Shell() - 96ns [DEBUG] 15:52:16.192 text.go:Render:70 → Rendering template: plain [DEBUG] 15:52:16.192 text.go:Render:70 → Rendering template: plain [DEBUG] 15:52:16.192 text.go:Render:70 → Rendering template: plain [DEBUG] 15:52:16.192 text.go:Render:70 → Rendering template: plain [DEBUG] 15:52:16.192 text.go:Render:70 → Rendering template: plain [TRACE] 15:52:16.192 shell.go:Shell() - 43ns [TRACE] 15:52:16.192 shell.go:Shell() - 26ns [TRACE] 15:52:16.192 shell.go:Flags() - 39ns [TRACE] 15:52:16.192 shell.go:Shell() - 24ns [TRACE] 15:52:16.192 shell.go:Shell() - 24ns [DEBUG] 15:52:16.193 shell_unix.go:TerminalWidth:80 → terminal width: 209 [TRACE] 15:52:16.193 shell_unix.go:TerminalWidth() - 479.04µs [TRACE] 15:52:16.193 shell.go:Flags() - 52ns [DEBUG] 15:52:16.193 shell.go:Getenv:398 → NO DATA [TRACE] 15:52:16.193 shell.go:Getenv(OMP_CACHE_DIR) - 2.78µs [DEBUG] 15:52:16.193 shell.go:Getenv:398 → NO DATA [TRACE] 15:52:16.193 shell.go:Getenv(XDG_CACHE_HOME) - 1.422µs [TRACE] 15:52:16.193 shell_unix.go:CachePath() - 12.035µs [TRACE] 15:52:16.193 shell.go:Flags() - 46ns ```
JanDeDobbeleer commented 8 months ago

This is perfectly fine, I'm going to do a huge refactoring on the configuration part for this. Give me a few.

jacktose commented 8 months ago

Wow, quick work! Much of what I said is fixed, but the YAML & TOML output still seem broken somehow: omp Here I start with a basic prompt and export the default config in each format. Then I eval "$(oh-my-posh init bash --config ... with each exported file in turn: JSON (1) works fine. (That's also what it looks like when I don't specify any --config.) TOML (2) & YAML (3) result in a garbled prompt. (The blurred parts are all my username or hostname.) Going back to JSON (4) works fine again.

I don't think it's specific to the default config. I tried turning a known good .json config into a .toml (oh-my-posh config export --config ".../jandedobbeleer.omp.json" --format toml --output jandedobbeleer.omp.toml) and that .toml gets me a similarly garbled prompt.

Here's a gist with all those files.

Also (maybe unrelated), my customized .toml config that worked this morning in 19.13.0 now gets me the default prompt with CONFIG ERROR in the status segment.

Please let me know if I can help by testing something else, opening a separate issue, etc. (I'd offer a PR, but I don't really know Go.)

JanDeDobbeleer commented 8 months ago

@jacktose this is a bug in the underlying toml/yaml parser. They use single quotes for strings the contain characters outside the multilingual plane which makes them literal (which is what you see). I'll need to fix it there, or forcer the use of double quotes for strings.

About your customized toml, make sure the version property is an int and not a float. The previous parser handled that incorrectly.

jacktose commented 8 months ago

19.16.1 looks good! I haven't exactly tested everything from above, but my use case is working fine: exporting the default config (in any format), editing it, and using it.

Thank you!

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