JanDeDobbeleer / oh-my-posh

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

Initial `/` not being displayed #5311

Closed widogg closed 1 month ago

widogg commented 1 month ago

Code of Conduct

What happened?

In the path segment I'm using style agnoster_short. The issue I have is that, when not under my home path, I don't see the first / in the path.

Here's an example: image

Theme

My own, based on catppuccin. Here's my full path block

    - type: path
      style: plain
      foreground: p:lavender
      foreground_templates:
        - "{{ if not .Writable }}p:red{{end}}"
      template: "{{ .Path }}{{ if not .Writable }} 󱧸{{end}}"
      properties:
        folder_icon: ".."
        style: agnoster_short
        max_depth: 2

What OS are you seeing the problem on?

Linux

Which shell are you using?

bash

Log output

Version: 21.27.0

Shell: bash (5.1.16(1)-release)

Prompt:

var/../prereg/bundled 󱧸$

Segments:

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

Run duration: 20.374141ms

Cache path: /home/<user>/.cache/oh-my-posh

Config path: /home/<user>/.config/oh-my-posh/base.yaml

Logs:

[DEBUG] 01:00:09.832 os.go:Getenv:306 → NO DATA
[TRACE] 01:00:09.832 os.go:Getenv(OMP_CACHE_DIR) - 7.93406ms
[DEBUG] 01:00:09.832 os.go:Getenv:306 → NO DATA
[TRACE] 01:00:09.832 os.go:Getenv(XDG_CACHE_HOME) - 7.991µs
[TRACE] 01:00:09.832 os_unix.go:CachePath() - 7.977413ms
[DEBUG] 01:00:09.832 os.go:Getenv:306 → /home/<user>/.config/oh-my-posh/base.yaml
[TRACE] 01:00:09.832 os.go:Getenv(POSH_THEME) - 5.157µs
[DEBUG] 01:00:09.832 os_unix.go:Platform:87 → ubuntu
[TRACE] 01:00:09.832 os.go:resolveConfigPath() - 12.29µs
[TRACE] 01:00:09.832 os.go:Init() - 8.152142ms
[TRACE] 01:00:09.832 os.go:Flags() - 57ns
[TRACE] 01:00:09.835 load.go:loadConfig() - 2.365058ms
[TRACE] 01:00:09.835 os.go:Flags() - 90ns
[DEBUG] 01:00:09.835 debug.go:44 → Terminal shell: %s shell
[DEBUG] 01:00:09.835 debug.go:44 → Terminal program: %s terminology
[DEBUG] 01:00:09.835 os.go:Getenv:306 → NO DATA
[TRACE] 01:00:09.835 os.go:Getenv(OMP_CACHE_DISABLED) - 4.165µs
[DEBUG] 01:00:09.835 os.go:Shell:581 → no shell name provided in flags, trying to detect it
[DEBUG] 01:00:09.836 os.go:Shell:589 → process name: bash
[TRACE] 01:00:09.836 os.go:Shell() - 766.012µs
[DEBUG] 01:00:09.836 os.go:Getenv:306 → 5.1.16(1)-release
[TRACE] 01:00:09.836 os.go:Getenv(POSH_SHELL_VERSION) - 3.8µs
[DEBUG] 01:00:09.836 debug.go:PrintDebug:23 → Segment: Title
[DEBUG] 01:00:09.836 text.go:Render:73 → Rendering template:
[TRACE] 01:00:09.836 os.go:Shell() - 55ns
[DEBUG] 01:00:09.836 os.go:Getenv:306 → NO DATA
[TRACE] 01:00:09.836 os.go:Getenv(POSH_CURSOR_LINE) - 1.912µs
[DEBUG] 01:00:09.836 os.go:Getenv:306 → NO DATA
[TRACE] 01:00:09.836 os.go:Getenv(POSH_CURSOR_COLUMN) - 1.635µs
[TRACE] 01:00:09.836 os.go:Flags() - 43ns
[TRACE] 01:00:09.836 os.go:Flags() - 21ns
[TRACE] 01:00:09.836 os.go:Flags() - 21ns
[TRACE] 01:00:09.836 os.go:GOOS() - 50ns
[DEBUG] 01:00:09.836 os.go:Pwd:336 → /var/lib/libreoffice/share/prereg/bundled
[TRACE] 01:00:09.836 os.go:Pwd() - 10.064µs
[TRACE] 01:00:09.836 os.go:GOOS() - 20ns
[DEBUG] 01:00:09.836 segment.go:SetEnabled:115 → Segment: Executiontime
[DEBUG] 01:00:09.836 executiontime.go:Enabled:57 → always_enabled: false
[TRACE] 01:00:09.836 os.go:ExecutionTime() - 69ns
[DEBUG] 01:00:09.836 executiontime.go:Enabled:59 → threshold: 10000.000000
[TRACE] 01:00:09.836 os.go:Shell() - 73ns
[TRACE] 01:00:09.836 os.go:Shell() - 44ns
[TRACE] 01:00:09.836 os.go:Flags() - 45ns
[TRACE] 01:00:09.836 os.go:Pwd() - 85ns
[TRACE] 01:00:09.836 os.go:GOOS() - 35ns
[DEBUG] 01:00:09.836 segment.go:SetEnabled:115 → Segment: Text
[TRACE] 01:00:09.836 os_unix.go:Root() - 201ns
[TRACE] 01:00:09.836 os.go:Shell() - 34ns
[TRACE] 01:00:09.836 os.go:StatusCodes() - 119ns
[DEBUG] 01:00:09.836 os_unix.go:IsWsl:35 → false
[TRACE] 01:00:09.836 os.go:Flags() - 216ns
[TRACE] 01:00:09.836 os_unix.go:IsWsl() - 4.26µs
[TRACE] 01:00:09.836 os.go:Flags() - 125ns
[TRACE] 01:00:09.836 os.go:Flags() - 125ns
[TRACE] 01:00:09.836 os.go:Pwd() - 180ns
[TRACE] 01:00:09.836 os.go:Pwd() - 113ns
[TRACE] 01:00:09.836 os.go:GOOS() - 60ns
[TRACE] 01:00:09.836 os.go:GOOS() - 56ns
[DEBUG] 01:00:09.836 segment.go:SetEnabled:115 → Segment: Command
[TRACE] 01:00:09.836 os.go:Flags() - 133ns
[TRACE] 01:00:09.836 os.go:Pwd() - 91ns
[TRACE] 01:00:09.836 os.go:Flags() - 144ns
[DEBUG] 01:00:09.836 segment.go:SetEnabled:115 → Segment: Git
[TRACE] 01:00:09.836 os.go:GOOS() - 45ns
[DEBUG] 01:00:09.836 command.go:Enabled:33 → bash
[TRACE] 01:00:09.836 os.go:Flags() - 78ns
[DEBUG] 01:00:09.836 segment.go:SetEnabled:115 → Segment: Battery
[DEBUG] 01:00:09.836 os_unix.go:IsWsl:35 → false
[TRACE] 01:00:09.836 os.go:Pwd() - 146ns
[TRACE] 01:00:09.836 os.go:Pwd() - 143ns
[TRACE] 01:00:09.836 os_unix.go:IsWsl() - 3.753µs
[TRACE] 01:00:09.836 os.go:GOOS() - 48ns
[DEBUG] 01:00:09.836 os_unix.go:IsWsl:35 → false
[TRACE] 01:00:09.836 os.go:GOOS() - 54ns
[TRACE] 01:00:09.836 os_unix.go:IsWsl2() - 7.172µs
[TRACE] 01:00:09.836 os_unix.go:IsWsl() - 5.994µs
[TRACE] 01:00:09.836 os.go:Pwd() - 108ns
[DEBUG] 01:00:09.836 segment.go:SetEnabled:115 → Segment: Session
[TRACE] 01:00:09.836 os.go:GOOS() - 24ns
[TRACE] 01:00:09.836 os.go:GOOS() - 51ns
[DEBUG] 01:00:09.836 os.go:TemplateCache:789 ↓
    environment: [SHELL=/bin/bash WINDOWID=54525987 QT_ACCESSIBILITY=1 XDG_CONFIG_DIRS=/usr/etc/xdg:/etc/xdg/xdg-enlightenment:/etc/xdg E_CONF_PROFILE=standard XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session2 NVM_INC=/home/<user>/.nvm/versions/node/v18.20.3/include/node XDG_MENU_PREFIX=e- E_RESTART=1 TERM_PROGRAM_VERSION=1.12.1 POSH_PID=4184181 E_TAINTED=NO FREETYPE_PROPERTIES=truetype:interpreter-version=35 MANDATORY_PATH=/usr/share/gconf/enlightenment.mandatory.path LC_ADDRESS=es_AR.UTF-8 LC_NAME=es_AR.UTF-8 SSH_AUTH_SOCK=/tmp/ssh-XXXXXXi1iUXd/agent.940425 E_LIB_DIR=/usr/lib/x86_64-linux-gnu XCURSOR_PATH=/home/<user>/.icons:/usr/share/icons E_ICON_THEME=Breeze KDE-Story-Dark E_IPC_SOCKET=/run/user/1000/e-<user>@31f4b8b8/2313311 DESKTOP_SESSION=enlightenment LC_MONETARY=es_AR.UTF-8 SSH_AGENT_PID=940465 FZF_ALT_C_OPTS=--tiebreak=index --exact --preview 'tree -C {} | head -200' --preview-window right:55%:nowrap  XDG_SEAT=seat0 PWD=/var/lib/libreoffice/share/prereg/bundled LOGNAME=<user> XDG_SESSION_DESKTOP=Enlightenment QT_QPA_PLATFORMTHEME=qt5ct E_START_MANAGER=1 XDG_SESSION_TYPE=x11 GPG_AGENT_INFO=/run/user/1000/gnupg/S.gpg-agent:0:1 XAUTHORITY=/home/<user>/.Xauthority DESKTOP_STARTUP_ID=E_START|88 E_DESKLOCK_LOCKED= E_SCALE=1,350 HOME=/home/<user> SSH_ASKPASS=/usr/bin/enlightenment_askpass LANG=en_US.UTF-8 LC_PAPER=es_AR.UTF-8 FZF_CTRL_R_OPTS=--no-sort --exact --preview 'echo {}' --preview-window down:2:wrap 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=30;41: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:*.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: XDG_CURRENT_DESKTOP=Enlightenment POSH_SHELL_VERSION=5.1.16(1)-release CONDA_PROMPT_MODIFIER=false XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 PANTS=ON XTERM_256_COLORS=1 FZF_COMPLETION_AUTO_COMMON_PREFIX_PART=true TERMINOLOGY=1 E_START=/usr/bin/enlightenment_start NVM_DIR=/home/<user>/.nvm E_PREFIX=/usr LESSCLOSE=/usr/bin/lesspipe %s %s XDG_SESSION_CLASS=user TERM=xterm-256color LC_IDENTIFICATION=es_AR.UTF-8 DEFAULTS_PATH=/usr/share/gconf/enlightenment.default.path LESSOPEN=| /usr/bin/lesspipe %s USER=<user> FZF_ALT_C_COMMAND=bfs -color -mindepth 1 -exclude \( -name .git \) -type d -printf '%P\n' 2>/dev/null E_DATA_DIR=/usr/share/enlightenment SUDO_ASKPASS=/usr/bin/enlightenment_askpass DISPLAY=:0.0 SHLVL=1 NVM_CD_FLAGS= LC_TELEPHONE=es_AR.UTF-8 LC_MEASUREMENT=es_AR.UTF-8 XDG_VTNR=1 DESKTOP=Enlightenment XDG_SESSION_ID=609 POSH_THEME=/home/<user>/.config/oh-my-posh/base.yaml XDG_RUNTIME_DIR=/run/user/1000 E_HOME_DIR=/home/<user>/.e/e LC_TIME=es_AR.UTF-8 E_BIN_DIR=/usr/bin FZF_COMPLETION_AUTO_COMMON_PREFIX=true QT_AUTO_SCREEN_SCALE_FACTOR=0 XDG_DATA_DIRS=/usr/share:/usr/share/enlightenment:/usr/local/share/:/usr/share/ EMIX_SINK_ICONS=/usr/lib/x86_64-linux-gnu/enlightenment/modules/mixer/sink-icons.txt BROWSER=/usr/bin/google-chrome-stable PATH=/home/<user>/.nvm/versions/node/v18.20.3/bin:/home/<user>/Applications/.bin:/home/<user>/.local/bin:/home/<user>/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus FZF_DEFAULT_OPTS=   --ansi -e --tabstop=2   --no-sort   --select-1   --exit-0   --min-height 15   --bind tab:accept   --bind 'pgdn:preview-down'   --bind 'pgup:preview-up'
       --color=border:#5fd7ff,spinner:#f2d5cf,hl:#e78284   --color=fg:#c6d0f5,header:#e78284,info:#ca9ee6,pointer:#5fd7ff   --color=marker:#303446,fg+:#e78284,prompt:#ca9ee6,hl+:#e78284 NVM_BIN=/home/<user>/.nvm/versions/node/v18.20.3/bin POWERLINE_COMMAND=oh-my-posh LC_NUMERIC=es_AR.UTF-8 OLDPWD=/home/<user> E_LOCALE_DIR=/usr/share/locale TERM_PROGRAM=terminology _=/home/<user>/bin/oh-my-posh]
[TRACE] 01:00:09.836 os.go:Getenv(SSH_CONNECTION) - 4.28µs
[DEBUG] 01:00:09.836 terraform.go:Enabled:42 → fetch_version: false
[DEBUG] 01:00:09.836 os.go:Getenv:306 → NO DATA
[DEBUG] 01:00:09.836 path.go:124 → display_cygpath: false
[TRACE] 01:00:09.836 os.go:Getenv(SSH_CLIENT) - 2.786µs
[TRACE] 01:00:09.836 os.go:GOOS() - 48ns
[DEBUG] 01:00:09.836 os.go:CommandPath:533 → /usr/bin/bash
[TRACE] 01:00:09.836 os.go:PathSeparator() - 43ns
[DEBUG] 01:00:09.836 os_unix.go:Platform:87 → ubuntu
[TRACE] 01:00:09.836 os.go:CommandPath(bash) - 33.116µs
[TRACE] 01:00:09.836 os.go:Pwd() - 51ns
[TRACE] 01:00:09.836 os.go:Pwd() - 92ns
[TRACE] 01:00:09.836 os.go:HasCommand(bash) - 37.288µs
[TRACE] 01:00:09.836 os.go:Shell() - 107ns
[DEBUG] 01:00:09.836 os.go:CommandPath:533 → /usr/bin/git
[TRACE] 01:00:09.836 os.go:Shell() - 38ns
[DEBUG] 01:00:09.836 command.go:Enabled:38 → cat /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon8/temp1_input
[TRACE] 01:00:09.836 os_unix.go:IsWsl() - 3.839µs
[TRACE] 01:00:09.836 os.go:CommandPath(git) - 28.013µs
[DEBUG] 01:00:09.836 os.go:CommandPath:533 → /usr/bin/terraform
[TEBUG] 01:00:09.836 command.go:runCommand:52 → interpret: true
[TRACE] 01:00:09.836 os.go:HasCommand(git) - 32.301µs
[TRACE] 01:00:09.836 os.go:CommandPath(terraform) - 25.517µs
[TRACE] 01:00:09.836 os.go:GOOS() - 30ns
[TRACE] 01:00:09.836 os.go:Pwd() - 71ns
[TRACE] 01:00:09.836 os.go:GOOS() - 48ns
[TRACE] 01:00:09.836 os.go:HasCommand(terraform) - 30.001µs
[TRACE] 01:00:09.836 os.go:GOOS() - 34ns
[TRACE] 01:00:09.836 os.go:GOOS() - 52ns
[TRACE] 01:00:09.836 os.go:Pwd() - 86ns
[TRACE] 01:00:09.836 os.go:GOOS() - 469ns
[TRACE] 01:00:09.836 os.go:GOOS() - 45ns
[DEBUG] 01:00:09.836 path.go:replaceMappedLocations:517 → mapped_locations_enabled: true
[DEBUG] 01:00:09.836 os.go:HasFolder:418 → false
[TRACE] 01:00:09.836 os.go:GOOS() - 36ns
[DEBUG] 01:00:09.836 path.go:replaceMappedLocations:518 → 
[TRACE] 01:00:09.836 os.go:GOOS() - 40ns
[TRACE] 01:00:09.836 os.go:HasFolder(/var/lib/libreoffice/share/prereg/bundled/.terraform) - 6.475µs
[DEBUG] 01:00:09.836 path.go:replaceMappedLocations:519 → 
[DEBUG] 01:00:09.836 os.go:ResolveSymlink:433 → /var/lib/libreoffice/share/prereg/bundled
[DEBUG] 01:00:09.836 os.go:User:474 → <user>
[TRACE] 01:00:09.836 os.go:GOOS() - 50ns
[TRACE] 01:00:09.836 os.go:Pwd() - 72ns
[DEBUG] 01:00:09.836 path.go:replaceMappedLocations:520 → ~
[TRACE] 01:00:09.836 os.go:User() - 4.013µs
[TRACE] 01:00:09.836 os.go:ResolveSymlink(/var/lib/libreoffice/share/prereg/bundled) - 18.794µs
[DEBUG] 01:00:09.836 os.go:Host:491 → black-back
[DEBUG] 01:00:09.836 path.go:replaceMappedLocations:525 → mapped_locations: map[]
[TRACE] 01:00:09.836 os.go:Host() - 4.462µs
[TRACE] 01:00:09.836 os.go:GOOS() - 49ns
[DEBUG] 01:00:09.836 os_unix.go:Platform:87 → ubuntu
[DEBUG] 01:00:09.836 os.go:Getenv:306 → 1
[ERROR] 01:00:09.836 os.go:HasParentFilePath:697 → stat .git: no such file or directory
[TRACE] 01:00:09.836 os.go:HasParentFilePath(.git) - 56.715µs
[TRACE] 01:00:09.836 os.go:GOOS() - 52ns
[TRACE] 01:00:09.836 os.go:TemplateCache() - 177.313µs
[DEBUG] 01:00:09.836 git.go:shouldDisplay:284 → fetch_bare_info: false
[TRACE] 01:00:09.836 os.go:GOOS() - 34ns
[TRACE] 01:00:09.836 os.go:Flags() - 98ns
[DEBUG] 01:00:09.836 path.go:makeFolderFormatMap:841 → NO DATA
[DEBUG] 01:00:09.836 os.go:HasFilesInDir:389 → false
[TRACE] 01:00:09.836 os.go:Pwd() - 76ns
[DEBUG] 01:00:09.836 path.go:setStyle:192 → agnoster_short
[TRACE] 01:00:09.836 os.go:GOOS() - 40ns
[TRACE] 01:00:09.836 os.go:HasFilesInDir(.tf) - 58.8µs
[DEBUG] 01:00:09.836 segment.go:SetEnabled:115 → Segment: Node
[DEBUG] 01:00:09.836 path.go:getAgnosterShortPath:464 → max_depth: 2
[TRACE] 01:00:09.836 os.go:Pwd() - 77ns
[DEBUG] 01:00:09.836 path.go:getAgnosterShortPath:469 → ..
[DEBUG] 01:00:09.836 path.go:getAgnosterShortPath:470 → hide_root_location: false
[DEBUG] 01:00:09.836 language.go:Enabled:109 → extensions: [*.js *.ts package.json .nvmrc pnpm-workspace.yaml .pnpmfile.cjs .vue]
[DEBUG] 01:00:09.836 path.go:colorizePath:715 → cycle: []
[DEBUG] 01:00:09.836 language.go:Enabled:117 → home_enabled: false
[DEBUG] 01:00:09.836 path.go:getFolderSeparator:250 → NO DATA
[TRACE] 01:00:09.836 os.go:Pwd() - 32ns
[DEBUG] 01:00:09.836 path.go:getFolderSeparator:252 → /
[DEBUG] 01:00:09.836 language.go:Enabled:129 → files
[DEBUG] 01:00:09.836 path.go:colorizePath:718 → cycle_folder_separator: false
[DEBUG] 01:00:09.836 path.go:colorizePath:719 → %s
[DEBUG] 01:00:09.836 os.go:HasFilesInDir:389 → false
[DEBUG] 01:00:09.836 path.go:colorizePath:721 → %s
[DEBUG] 01:00:09.836 node.go:loadContext:56 → fetch_package_manager: false
[DEBUG] 01:00:09.836 path.go:colorizePath:722 → %s
[TRACE] 01:00:09.836 os.go:HasFilesInDir(.tfplan) - 21.51µs
[DEBUG] 01:00:09.836 path.go:colorizePath:723 → %s
[TRACE] 01:00:09.836 os.go:Pwd() - 93ns
[TRACE] 01:00:09.836 os.go:Pwd() - 77ns
[TRACE] 01:00:09.836 os.go:TemplateCache() - 257ns
[TRACE] 01:00:09.836 os.go:StackCount() - 51ns
[DEBUG] 01:00:09.836 os.go:HasFilesInDir:389 → false
[TRACE] 01:00:09.836 os_unix.go:DirIsWritable(/var/lib/libreoffice/share/prereg/bundled) - 4.142µs
[TRACE] 01:00:09.836 os.go:HasFilesInDir(.tfstate) - 15.418µs
[TRACE] 01:00:09.836 os.go:TemplateCache() - 62ns
[DEBUG] 01:00:09.836 os.go:HasFilesInDir:389 → false
[TRACE] 01:00:09.836 os.go:HasFilesInDir(*.js) - 35.52µs
[TRACE] 01:00:09.837 os.go:Pwd() - 74ns
[TRACE] 01:00:09.837 os.go:Pwd() - 186ns
[TRACE] 01:00:09.837 os.go:GOOS() - 52ns
[DEBUG] 01:00:09.837 segment.go:SetEnabled:115 → Segment: Sysinfo
[TRACE] 01:00:09.837 os.go:TemplateCache() - 167ns
[DEBUG] 01:00:09.837 os.go:RunCommand:511 → NO DATA
[TRACE] 01:00:09.837 os.go:RunCommand(who am i) - 1.099324ms
[TRACE] 01:00:09.837 os.go:TemplateCache() - 207ns
[DEBUG] 01:00:09.837 os.go:HasFilesInDir:389 → false
[TRACE] 01:00:09.838 os.go:HasFilesInDir(*.ts) - 1.602567ms
[TRACE] 01:00:09.838 os.go:Pwd() - 128ns
[DEBUG] 01:00:09.838 os.go:HasFilesInDir:389 → false
[TRACE] 01:00:09.838 os.go:HasFilesInDir(package.json) - 53.95µs
[TRACE] 01:00:09.838 os.go:Pwd() - 94ns
[DEBUG] 01:00:09.838 os.go:HasFilesInDir:389 → false
[TRACE] 01:00:09.838 os.go:HasFilesInDir(.nvmrc) - 21.742µs
[TRACE] 01:00:09.838 os.go:Pwd() - 80ns
[DEBUG] 01:00:09.838 os.go:HasFilesInDir:389 → false
[TRACE] 01:00:09.838 os.go:HasFilesInDir(pnpm-workspace.yaml) - 19.516µs
[TRACE] 01:00:09.838 os.go:Pwd() - 60ns
[DEBUG] 01:00:09.838 os.go:HasFilesInDir:389 → false
[TRACE] 01:00:09.838 os.go:HasFilesInDir(.pnpmfile.cjs) - 16.462µs
[TRACE] 01:00:09.838 os.go:Pwd() - 61ns
[DEBUG] 01:00:09.838 os.go:HasFilesInDir:389 → false
[TRACE] 01:00:09.838 os.go:HasFilesInDir(.vue) - 18.343µs
[ERROR] 01:00:09.838 os.go:RunCommand:509 → exit status 1
[DEBUG] 01:00:09.838 os.go:RunCommand:511 ↓
    cat: /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon8/temp1_input: No such file or directory

[TRACE] 01:00:09.838 os.go:RunCommand(bash -c cat /sys/devices/platform/thinkpad_hwmon/hwmon/hwmon8/temp1_input) - 2.289324ms
[TRACE] 01:00:09.838 os.go:RunShellCommand() - 2.305739ms
[TRACE] 01:00:09.843 os_windows_nix.go:BatteryState() - 6.482316ms
[DEBUG] 01:00:09.843 battery.go:Enabled:55 → NO DATA
[TRACE] 01:00:09.843 os.go:TemplateCache() - 867ns
[DEBUG] 01:00:09.843 text.go:Render:73 → Rendering template: {{ if .Root }}<p:red>#</>{{ else }}${{ end }}
[DEBUG] 01:00:09.843 text.go:Render:73 → Rendering template: {{ .Path }}{{ if not .Writable }} 󱧸{{end}}
[DEBUG] 01:00:09.843 text.go:Render:73 → Rendering template: {{ if .SSHSession }} @{{ .HostName }}{{ end }}
[DEBUG] 01:00:09.843 text.go:Render:73 → Rendering template: {{ if lt 5 .Load1 }} ⌂{{ .Load1 }}{{end }}
[DEBUG] 01:00:09.843 text.go:Render:73 → Rendering template: {{ if not .Error }} {{ if gt 40 .Percentage }}<p:red>󱊡[{{ .Percentage }}]</>{{ else if gt 70 .Percentage}}󱊢{{ else if eq "Discharging" .State.String}}󱊣{{ end }}{{ end }}
[TRACE] 01:00:09.843 os.go:TemplateCache() - 262ns
[TRACE] 01:00:09.843 os.go:TemplateCache() - 374ns
[TRACE] 01:00:09.843 os.go:TemplateCache() - 78ns
[TRACE] 01:00:09.843 os.go:TemplateCache() - 191ns
[TRACE] 01:00:09.843 os.go:TemplateCache() - 165ns
[TRACE] 01:00:09.843 os.go:TemplateCache() - 227ns
[TRACE] 01:00:09.843 os.go:TemplateCache() - 150ns
[TRACE] 01:00:09.844 os.go:TemplateCache() - 91ns
[DEBUG] 01:00:09.844 text.go:Render:73 → Rendering template: plain
[DEBUG] 01:00:09.844 text.go:Render:73 → Rendering template: powerline
[DEBUG] 01:00:09.844 text.go:Render:73 → Rendering template: diamond
[DEBUG] 01:00:09.844 text.go:Render:73 → Rendering template: diamond
[DEBUG] 01:00:09.844 text.go:Render:73 → Rendering template: diamond
[DEBUG] 01:00:09.844 text.go:Render:73 → Rendering template: plain
[DEBUG] 01:00:09.844 text.go:Render:73 → Rendering template: plain
[DEBUG] 01:00:09.844 text.go:Render:73 → Rendering template: {{ if not .Writable }}p:red{{end}}
[TRACE] 01:00:09.844 os.go:TemplateCache() - 107ns
[DEBUG] 01:00:09.844 text.go:Render:73 → Rendering template: plain
[DEBUG] 01:00:09.844 text.go:Render:73 → Rendering template: {{ if not .Writable }}p:red{{end}}
[TRACE] 01:00:09.844 os.go:TemplateCache() - 112ns
[DEBUG] 01:00:09.844 text.go:Render:73 → Rendering template: {{if ne .Code 0}}p:red{{end}}
[TRACE] 01:00:09.844 os.go:TemplateCache() - 107ns
[DEBUG] 01:00:09.844 text.go:Render:73 → Rendering template: plain
[DEBUG] 01:00:09.844 text.go:Render:73 → Rendering template: {{if ne .Code 0}}p:red{{end}}
[TRACE] 01:00:09.844 os.go:TemplateCache() - 110ns
[TRACE] 01:00:09.844 os.go:Shell() - 245ns
[TRACE] 01:00:09.844 os.go:Shell() - 64ns
[TRACE] 01:00:09.844 os.go:Shell() - 37ns
[TRACE] 01:00:09.844 os.go:Shell() - 36ns
[DEBUG] 01:00:09.844 os.go:Getenv:306 → NO DATA
[TRACE] 01:00:09.844 os.go:Getenv(OMP_CACHE_DIR) - 4.855µs
[DEBUG] 01:00:09.844 os.go:Getenv:306 → NO DATA
[TRACE] 01:00:09.844 os.go:Getenv(XDG_CACHE_HOME) - 3.56µs
[TRACE] 01:00:09.844 os_unix.go:CachePath() - 31.387µs
[TRACE] 01:00:09.844 os.go:Flags() - 52ns
JanDeDobbeleer commented 1 month ago

@widogg this appears to be by design. One can argue the design, but it's even mentioned in the code.

widogg commented 1 month ago

this appears to be by design

ok.... I guess 😅

One can argue the design

I certainly would. It feels very counter-intuitive, for a "*nix" path.

but it's even mentioned in the code

I have not read the code, would you mind sharing the permalink to that mention in the code?

This "felt" like a bug but, if this is the desing, then so be it, I'm ok with closing it

Thanks for taking a look!

JanDeDobbeleer commented 1 month ago

@widogg you can always use a different style, there's plenty available. Only the agnoster ones have this behavior. There's a reason for this but I don't remember.