JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer

Home Page:https://ohmyposh.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incompatible on fish 3.3

UndefBhvr opened this issue · comments

Code of Conduct

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

What happened?

The program trys to invoke "commandline --is-valid" in fish. However, "--is-valid" is available since fish 3.4.

This page recommend to use fish over 3.1.2, but actually the program doesn't work for fish below 3.4. Maybe the use of "--is-valid" should be removed, or the document page should be modified.

Error message after each operation

Theme

Default theme without any configuration

What OS are you seeing the problem on?

Linux

Which shell are you using?

fish

Log output

Version: 22.0.3

Shell: fish (3.3.1)

Prompt:

  root   ~     

Segments:

ConsoleTitle(true)                        -   0 ms
Session(true)                             -   0 ms
Path(true)                                -   1 ms
Root(true)                                -   0 ms
Status(true)                              -   2 ms
Node(false)                               -   0 ms
Go(false)                                 -   0 ms
Python(false)                             -   0 ms
Shell(false)                              -   0 ms
Time(false)                               -   0 ms

Run duration: 25.77249ms

Cache path: /root/.cache/oh-my-posh

Config path: no --config set, using default built-in configuration

Logs:

[DEBUG] 11:38:40.309 os.go:Getenv:309 → NO DATA
[TRACE] 11:38:40.309 os.go:Getenv(OMP_CACHE_DIR) - 91.59µs
[DEBUG] 11:38:40.309 os.go:Getenv:309 → NO DATA
[TRACE] 11:38:40.309 os.go:Getenv(XDG_CACHE_HOME) - 7.28µs
[TRACE] 11:38:40.309 os_unix.go:CachePath() - 162.32µs
[DEBUG] 11:38:40.309 os.go:Getenv:309 → NO DATA
[TRACE] 11:38:40.309 os.go:Getenv(POSH_THEME) - 14.01µs
[DEBUG] 11:38:40.309 os.go:resolveConfigPath:250 → No config set, fallback to default config
[TRACE] 11:38:40.309 os.go:resolveConfigPath() - 44.87µs
[TRACE] 11:38:40.309 os.go:Init() - 789.64µs
[TRACE] 11:38:40.309 os.go:Flags() - 100ns
[DEBUG] 11:38:40.309 load.go:loadConfig:55 → no config file specified, using default
[TRACE] 11:38:40.309 load.go:loadConfig() - 56.12µs
[TRACE] 11:38:40.309 os.go:Flags() - 70ns
[DEBUG] 11:38:40.309 debug.go:44 → Terminal shell: %s shell
[DEBUG] 11:38:40.309 debug.go:44 → Terminal program: %s Unknown
[DEBUG] 11:38:40.309 os.go:Getenv:309 → NO DATA
[TRACE] 11:38:40.309 os.go:Getenv(OMP_CACHE_DISABLED) - 8µs
[DEBUG] 11:38:40.309 os.go:Shell:584 → no shell name provided in flags, trying to detect it
[DEBUG] 11:38:40.327 os.go:Shell:592 → process name: fish
[TRACE] 11:38:40.327 os.go:Shell() - 18.0493ms
[DEBUG] 11:38:40.327 os.go:Getenv:309 → 3.3.1
[TRACE] 11:38:40.327 os.go:Getenv(POSH_SHELL_VERSION) - 9.46µs
[DEBUG] 11:38:40.327 debug.go:PrintDebug:23 → Segment: Title
[DEBUG] 11:38:40.328 text.go:Render:73 → Rendering template: {{ .Shell }} in {{ .Folder }}
[TRACE] 11:38:40.328 os_unix.go:Root() - 970ns
[TRACE] 11:38:40.328 os.go:Shell() - 220ns
[TRACE] 11:38:40.328 os.go:StatusCodes() - 130ns
[DEBUG] 11:38:40.328 os_unix.go:IsWsl:35 → false
[TRACE] 11:38:40.328 os_unix.go:IsWsl() - 13.8µs
[DEBUG] 11:38:40.328 os.go:TemplateCache:792 → environment: [NVM_CD_FLAGS= XML_CATALOG_FILES=file:///root/anaconda3/etc/xml/catalog file:///etc/xml/catalog CONDA_PYTHON_EXE=/root/anaconda3/bin/python LC_CTYPE=en_US.UTF-8 https_proxy=http://10.96.1.45:41881 SSH_CLIENT=10.4.0.19 57195 22 _CE_CONDA= CONDA_DEFAULT_ENV=base USER=root PATH=/root/anaconda3/bin:/root/anaconda3/condabin:/usr/local/nvm/versions/node/v16.20.2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin NVM_BIN=/usr/local/nvm/versions/node/v16.20.2/bin _CE_M= CONDA_PREFIX=/root/anaconda3 SHELL=/bin/bash SHLVL=2 MOTD_SHOWN=pam http_proxy=http://10.96.1.45:41881 POSH_SHELL_VERSION=3.3.1 _CUDA_COMPAT_PATH=/usr/local/cuda/compat POSH_THEME= LOGNAME=root TERM=xterm-256color HOME=/root CONDA_EXE=/root/anaconda3/bin/conda SSH_TTY=/dev/pts/2 OLDPWD=/usr/local/bin SSH_CONNECTION=10.4.0.19 57195 192.51.0.6 22 CONDA_SHLVL=1 CONDA_PROMPT_MODIFIER=false GSETTINGS_SCHEMA_DIR_CONDA_BACKUP= GSETTINGS_SCHEMA_DIR=/root/anaconda3/share/glib-2.0/schemas PWD=/root NVM_DIR=/usr/local/nvm NVM_INC=/usr/local/nvm/versions/node/v16.20.2/include/node]
[TRACE] 11:38:40.328 os.go:GOOS() - 160ns
[DEBUG] 11:38:40.328 os.go:Pwd:339 → /root
[TRACE] 11:38:40.328 os.go:Pwd() - 32.37µs
[DEBUG] 11:38:40.328 os_unix.go:IsWsl:35 → false
[TRACE] 11:38:40.328 os_unix.go:IsWsl() - 7.13µs
[TRACE] 11:38:40.328 os.go:GOOS() - 70ns
[TRACE] 11:38:40.328 os.go:GOOS() - 70ns
[TRACE] 11:38:40.328 os.go:GOOS() - 70ns
[TRACE] 11:38:40.328 os.go:GOOS() - 60ns
[TRACE] 11:38:40.328 os.go:GOOS() - 70ns
[TRACE] 11:38:40.328 os.go:GOOS() - 70ns
[DEBUG] 11:38:40.328 os.go:User:477 → root
[TRACE] 11:38:40.328 os.go:User() - 10.07µs
[DEBUG] 11:38:40.328 os.go:Host:494 → 36efc2dd7bd8
[TRACE] 11:38:40.328 os.go:Host() - 10.43µs
[TRACE] 11:38:40.328 os.go:GOOS() - 70ns
[DEBUG] 11:38:40.328 os_unix.go:Platform:87 → ubuntu
[DEBUG] 11:38:40.328 os.go:Getenv:309 → 2
[TRACE] 11:38:40.328 os.go:Getenv(SHLVL) - 6.51µs
[TRACE] 11:38:40.328 os.go:TemplateCache() - 285.95µs
[TRACE] 11:38:40.328 os.go:Shell() - 70ns
[DEBUG] 11:38:40.328 os.go:Getenv:309 → NO DATA
[TRACE] 11:38:40.328 os.go:Getenv(POSH_CURSOR_LINE) - 6.25µs
[DEBUG] 11:38:40.328 os.go:Getenv:309 → NO DATA
[TRACE] 11:38:40.329 os.go:Getenv(POSH_CURSOR_COLUMN) - 5.65µs
[TRACE] 11:38:40.329 os.go:Flags() - 120ns
[TRACE] 11:38:40.329 os.go:Flags() - 80ns
[TRACE] 11:38:40.329 os.go:Flags() - 230ns
[TRACE] 11:38:40.329 os.go:Flags() - 350ns
[TRACE] 11:38:40.329 os.go:Flags() - 920ns
[DEBUG] 11:38:40.329 status.go:Init:53 → {{ .Code }}
[TRACE] 11:38:40.329 os.go:Pwd() - 180ns
[TRACE] 11:38:40.329 os.go:Pwd() - 280ns
[TRACE] 11:38:40.329 os.go:GOOS() - 90ns
[TRACE] 11:38:40.329 os.go:GOOS() - 90ns
[DEBUG] 11:38:40.329 segment.go:SetEnabled:115 → Segment: Git
[DEBUG] 11:38:40.329 segment.go:SetEnabled:115 → Segment: Status
[TRACE] 11:38:40.329 os.go:StatusCodes() - 130ns
[DEBUG] 11:38:40.329 text.go:Render:73 → Rendering template: {{ .Code }}
[DEBUG] 11:38:40.329 os_unix.go:IsWsl:35 → false
[TRACE] 11:38:40.329 os.go:Pwd() - 250ns
[TRACE] 11:38:40.329 os.go:Flags() - 830ns
[TRACE] 11:38:40.329 os_unix.go:IsWsl() - 8.61µs
[TRACE] 11:38:40.329 os_unix.go:IsWsl2() - 15.21µs
[TRACE] 11:38:40.329 os.go:GOOS() - 100ns
[TRACE] 11:38:40.329 os.go:GOOS() - 60ns
[DEBUG] 11:38:40.329 segment.go:SetEnabled:115 → Segment: Path
[TRACE] 11:38:40.329 os.go:Pwd() - 520ns
[TRACE] 11:38:40.329 os.go:GOOS() - 120ns
[DEBUG] 11:38:40.329 path.go:124 → display_cygpath: false
[TRACE] 11:38:40.329 os.go:GOOS() - 90ns
[TRACE] 11:38:40.329 os.go:PathSeparator() - 140ns
[TRACE] 11:38:40.329 os.go:CommandPath(git) - 93.3µs
[TRACE] 11:38:40.329 os.go:Pwd() - 110ns
[TRACE] 11:38:40.329 os.go:HasCommand(git) - 103.48µs
[DEBUG] 11:38:40.329 os.go:Getenv:309 → 10.4.0.19 57195 192.51.0.6 22
[TRACE] 11:38:40.329 os.go:Shell() - 410ns
[TRACE] 11:38:40.329 os.go:Getenv(SSH_CONNECTION) - 22.08µs
[TRACE] 11:38:40.329 os.go:Pwd() - 150ns
[TRACE] 11:38:40.329 os.go:Shell() - 80ns
[TRACE] 11:38:40.329 os.go:TemplateCache() - 740ns
[TRACE] 11:38:40.329 os.go:Flags() - 350ns
[DEBUG] 11:38:40.329 os.go:ResolveSymlink:436 → /root
[TRACE] 11:38:40.329 os.go:ResolveSymlink(/root) - 199.64µs
[TRACE] 11:38:40.329 os.go:Pwd() - 130ns
[TRACE] 11:38:40.329 os.go:GOOS() - 170ns
[DEBUG] 11:38:40.329 segment.go:SetEnabled:115 → Segment: Root
[TRACE] 11:38:40.329 os_unix.go:Root() - 1.39µs
[TRACE] 11:38:40.329 os.go:TemplateCache() - 150ns
[DEBUG] 11:38:40.329 path.go:replaceMappedLocations:517 → mapped_locations_enabled: true
[ERROR] 11:38:40.329 os.go:HasParentFilePath:700 → stat .git: no such file or directory
[DEBUG] 11:38:40.329 path.go:replaceMappedLocations:518 → 
[DEBUG] 11:38:40.329 path.go:replaceMappedLocations:519 → 
[TRACE] 11:38:40.329 os.go:HasParentFilePath(.git) - 268.95µs
[TRACE] 11:38:40.329 os.go:GOOS() - 210ns
[DEBUG] 11:38:40.329 git.go:shouldDisplay:284 → fetch_bare_info: false
[DEBUG] 11:38:40.329 path.go:replaceMappedLocations:520 → ~
[DEBUG] 11:38:40.329 path.go:replaceMappedLocations:525 → mapped_locations: map[]
[TRACE] 11:38:40.329 os.go:GOOS() - 380ns
[TRACE] 11:38:40.330 os.go:GOOS() - 70ns
[DEBUG] 11:38:40.331 path.go:makeFolderFormatMap:841 → NO DATA
[TRACE] 11:38:40.331 os.go:Pwd() - 1.16µs
[TRACE] 11:38:40.331 os.go:TemplateCache() - 570ns
[TRACE] 11:38:40.331 os.go:StackCount() - 290ns
[TRACE] 11:38:40.331 os_unix.go:DirIsWritable(/root) - 11.21µs
[TRACE] 11:38:40.331 os.go:TemplateCache() - 130ns
[TRACE] 11:38:40.331 os.go:TemplateCache() - 860ns
[DEBUG] 11:38:40.331 status.go:Enabled:42 → always_enabled: true
[TRACE] 11:38:40.331 os.go:TemplateCache() - 150ns
[DEBUG] 11:38:40.331 text.go:Render:73 → Rendering template:   {{ path .Path .Location }}
[DEBUG] 11:38:40.331 text.go:Render:73 → Rendering template:  {{ if .SSHSession }} {{ end }}{{ .UserName }}
[DEBUG] 11:38:40.331 text.go:Render:73 → Rendering template:  {{ if gt .Code 0 }}{{ else }}{{ end }}
[DEBUG] 11:38:40.331 text.go:Render:73 → Rendering template:  
[TRACE] 11:38:40.333 os.go:TemplateCache() - 520ns
[TRACE] 11:38:40.333 os.go:TemplateCache() - 430ns
[TRACE] 11:38:40.333 os.go:TemplateCache() - 680ns
[DEBUG] 11:38:40.333 text.go:Render:73 → Rendering template: powerline
[DEBUG] 11:38:40.333 text.go:Render:73 → Rendering template: diamond
[DEBUG] 11:38:40.333 text.go:Render:73 → Rendering template: powerline
[DEBUG] 11:38:40.333 text.go:Render:73 → Rendering template: powerline
[DEBUG] 11:38:40.333 text.go:Render:73 → Rendering template: {{ if gt .Code 0 }}p:red{{ end }}
[TRACE] 11:38:40.334 os.go:TemplateCache() - 310ns
[DEBUG] 11:38:40.334 text.go:Render:73 → Rendering template: diamond
[DEBUG] 11:38:40.334 text.go:Render:73 → Rendering template: {{ if gt .Code 0 }}p:red{{ end }}
[TRACE] 11:38:40.334 os.go:TemplateCache() - 300ns
[TRACE] 11:38:40.334 os.go:Shell() - 200ns
[TRACE] 11:38:40.334 os.go:Shell() - 60ns
[TRACE] 11:38:40.334 os.go:Flags() - 100ns
[TRACE] 11:38:40.334 os.go:Shell() - 60ns
[TRACE] 11:38:40.334 os.go:Shell() - 70ns
[DEBUG] 11:38:40.334 os.go:Getenv:309 → NO DATA
[TRACE] 11:38:40.334 os.go:Getenv(OMP_CACHE_DIR) - 8.03µs
[DEBUG] 11:38:40.334 os.go:Getenv:309 → NO DATA
[TRACE] 11:38:40.334 os.go:Getenv(XDG_CACHE_HOME) - 5.61µs
[TRACE] 11:38:40.334 os_unix.go:CachePath() - 49.93µs
[TRACE] 11:38:40.334 os.go:Flags() - 70ns

@UndefBhvr 3.4 is indeed the minimal, I'll adjust that.

PS: 3.3.1 is 3 years old, I'd upgrade that one.