JanDeDobbeleer / oh-my-posh

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

Recent versions of oh-my-posh interact poorly with poetry #5577

Closed ovidiu closed 2 months ago

ovidiu commented 2 months ago

Code of Conduct

What happened?

Poetry is a python package manager. While inside a poetry project you should be able to run the poetry shell command and get a new shell that has the python virtualenv activated (the $VIRTUAL_ENV enviroment variable should be set correctly). This does not seem to happen when using recent versions of oh-my-posh. The new shell does spawn, but the python virtualenv is not active inside it.

I was able to bisect the issue to commit 28817bae481dfc3d715aa8aa4c1b6cda7d903e0f.

I came up with a minimal docker setup to reproduce it. This is the Dockerfile:

FROM golang:1.23-bookworm AS builder

WORKDIR /test

RUN set -eux; \
    git clone https://github.com/JanDeDobbeleer/oh-my-posh.git; \
    cd oh-my-posh/src; \
    git checkout 28817bae481dfc3d715aa8aa4c1b6cda7d903e0f; \
    # git checkout @~1; \
    go build

FROM python:3.12-bookworm

WORKDIR /test

COPY --from=builder /test/oh-my-posh/src/src /test/oh-my-posh

RUN set -eux; \
    echo 'eval "$(/test/oh-my-posh init bash)"' >> ~/.bashrc; \
    pip install poetry; \
    poetry init -q; \
    poetry add fastapi

ENTRYPOINT ["/usr/bin/tail", "-f", "/dev/null"]

You can copy that somewhere (review it first, of course), then in that directory run these commands:

docker build -t test-posh-img .
docker run -d --name test-posh test-posh-img
docker exec -it test-posh bash

You will be dropped at an oh-my-posh prompt. Run poetry shell. That will spawn the new shell that's supposed to have the virtualenv active. But if you type env | grep VIRTUAL_ENV that won't print anything. The environment variable is not defined. Also, if you start a python repl with python3 -i and at the >>> prompt type from fastapi import FastAPI you will get a ModuleNotFoundError: No module named 'fastapi' error.

Now, if you get out of the docker container, delete it (with docker rm -f test-posh), un-comment the git checkout @~1 line from the Dockerfile (to build based on the previous commit) and start over, you'll have a different experience: $VIRTUAL_ENV will be defined and will contain a path like /root/.cache/pypoetry/virtualenvs/test-swbZ_4R8-py3.12, and running from fastapi import FastAPI in python will not cause an error.

Theme

default

What OS are you seeing the problem on?

Linux, macOS

Which shell are you using?

bash, zsh

Log output

Version: 23.10.1

Shell: zsh (5.9)

Prompt:

 ovidiu   ]8;;file:/Users/ovidiu\~]8;;\    

Segments:

ConsoleTitle(true)                        -   0 ms
Session(true)                             -   4 ms
Path(true)                                -   0 ms
Status(true)                              -   0 ms
Shell(true)                               -   0 ms
Time(true)                                -   0 ms

Run duration: 7.660333ms

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

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

Logs:

[DEBUG] 14:21:24.162 debug.go:42 ‚Üí debug mode enabled
[DEBUG] 14:21:24.163 debug.go:42 ‚Üí plain mode enabled
[DEBUG] 14:21:24.163 terminal.go:Getenv:165 ‚Üí NO DATA
[TRACE] 14:21:24.163 terminal.go:Getenv(LOCALAPPDATA) - 7.542µs
[DEBUG] 14:21:24.163 terminal.go:Getenv:165 ‚Üí NO DATA
[TRACE] 14:21:24.163 terminal.go:Getenv(OMP_CACHE_DIR) - 2.25µs
[DEBUG] 14:21:24.163 terminal.go:Getenv:165 ‚Üí NO DATA
[TRACE] 14:21:24.163 terminal.go:Getenv(XDG_CACHE_HOME) - 2.25µs
[TRACE] 14:21:24.163 terminal.go:CachePath() - 38.125µs
[DEBUG] 14:21:24.163 terminal.go:70 ‚Üí loading cache file: /Users/ovidiu/.cache/oh-my-posh/omp.cache
[DEBUG] 14:21:24.163 terminal.go:70 ‚Üí loading cache key: environment_platform
[DEBUG] 14:21:24.163 terminal.go:70 ‚Üí loading cache key: is_wsl
[DEBUG] 14:21:24.163 terminal.go:70 ‚Üí loading cache key: upgrade_check
[TRACE] 14:21:24.163 terminal.go(/Users/ovidiu/.cache/oh-my-posh/omp.cache) - 108.166µs
[DEBUG] 14:21:24.163 terminal.go:Getenv:165 ‚Üí NO DATA
[TRACE] 14:21:24.163 terminal.go:Getenv(LOCALAPPDATA) - 2.625µs
[DEBUG] 14:21:24.163 terminal.go:Getenv:165 ‚Üí NO DATA
[TRACE] 14:21:24.163 terminal.go:Getenv(OMP_CACHE_DIR) - 2.209µs
[DEBUG] 14:21:24.163 terminal.go:Getenv:165 ‚Üí NO DATA
[TRACE] 14:21:24.163 terminal.go:Getenv(XDG_CACHE_HOME) - 2.25µs
[TRACE] 14:21:24.163 terminal.go:CachePath() - 24.292µs
[DEBUG] 14:21:24.163 terminal.go:70 ‚Üí loading cache file: /Users/ovidiu/.cache/oh-my-posh/omp.cache.68252
[DEBUG] 14:21:24.163 terminal.go:70 ‚Üí loading cache key: template_cache
[TRACE] 14:21:24.163 terminal.go(/Users/ovidiu/.cache/oh-my-posh/omp.cache.68252) - 77.041µs
[DEBUG] 14:21:24.163 terminal.go:Getenv:165 ‚Üí NO DATA
[TRACE] 14:21:24.163 terminal.go:Getenv(POSH_THEME) - 2.208µs
[DEBUG] 14:21:24.163 terminal.go:ResolveConfigPath:103 ‚Üí no config set, fallback to default config
[TRACE] 14:21:24.163 terminal.go:ResolveConfigPath() - 10.125µs
[TRACE] 14:21:24.163 terminal.go:SetPromptCount() - 375ns
[TRACE] 14:21:24.163 terminal.go:Init() - 393µs
[TRACE] 14:21:24.163 terminal.go:Flags() - 83ns
[DEBUG] 14:21:24.163 load.go:loadConfig:55 ‚Üí no config file specified, using default
[TRACE] 14:21:24.163 load.go:loadConfig() - 20.5µs
[TRACE] 14:21:24.163 terminal.go:Flags() - 84ns
[DEBUG] 14:21:24.163 debug.go:50 ‚Üí terminal program: WezTerm
[DEBUG] 14:21:24.163 debug.go:50 ‚Üí terminal shell: shell
[DEBUG] 14:21:24.163 terminal.go:Getenv:165 ‚Üí NO DATA
[TRACE] 14:21:24.163 terminal.go:Getenv(OMP_CACHE_DISABLED) - 2.375µs
[TRACE] 14:21:24.163 terminal.go:Shell() - 84ns
[DEBUG] 14:21:24.163 terminal.go:Getenv:165 ‚Üí 5.9
[TRACE] 14:21:24.163 terminal.go:Getenv(POSH_SHELL_VERSION) - 2.75µs
[DEBUG] 14:21:24.163 debug.go:PrintDebug:23 ‚Üí segment: Title
[DEBUG] 14:21:24.163 text.go:Render:80 ‚Üí rendering template: {{ .Shell }} in {{ .Folder }}
[TRACE] 14:21:24.163 terminal.go:Flags() - 42ns
[TRACE] 14:21:24.163 terminal_unix.go:Root() - 875ns
[TRACE] 14:21:24.163 terminal.go:Shell() - 42ns
[TRACE] 14:21:24.163 terminal.go:StatusCodes() - 208ns
[DEBUG] 14:21:24.163 terminal_unix.go:IsWsl:35 ‚Üí false
[TRACE] 14:21:24.163 terminal_unix.go:IsWsl() - 3.291µs
[DEBUG] 14:21:24.163 terminal.go:TemplateCache:652 ‚Üí environment: [COLORTERM=truecolor COMMAND_MODE=unix2003 HOME=/Users/ovidiu LANG=en_US.UTF-8 LOGNAME=ovidiu PATH=/Users/ovidiu/.pyenv/shims:/Users/ovidiu/.local/bin:/Users/ovidiu/.local/share/bob/nvim-bin:/Users/ovidiu/.luarocks/bin:/Users/ovidiu/.local/bin:/Users/ovidiu/.local/share/bob/nvim-bin:/Users/ovidiu/.cargo/bin:/opt/homebrew/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin SHELL=/bin/zsh SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.xp1pq1qNBK/Listeners TERM=xterm-256color TERM_PROGRAM=WezTerm TERM_PROGRAM_VERSION=20240203-110809-5046fc22 TMPDIR=/var/folders/82/19r3z41562zb1p_553y206440000gn/T/ USER=ovidiu WEZTERM_CONFIG_DIR=/Users/ovidiu/.config/wezterm WEZTERM_CONFIG_FILE=/Users/ovidiu/.config/wezterm/wezterm.lua WEZTERM_EXECUTABLE=/Applications/WezTerm.app/Contents/MacOS/wezterm-gui WEZTERM_EXECUTABLE_DIR=/Applications/WezTerm.app/Contents/MacOS WEZTERM_PANE=2 WEZTERM_UNIX_SOCKET=/Users/ovidiu/.local/share/wezterm/gui-sock-63673 XPC_FLAGS=0x0 XPC_SERVICE_NAME=0 __CFBundleIdentifier=com.github.wez.wezterm __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0 SHLVL=2 PWD=/Users/ovidiu OLDPWD=/Users/ovidiu/Public/delme/foo LUA_PATH=/opt/homebrew/Cellar/luarocks/3.11.1/share/lua/5.4/?.lua;/opt/homebrew/share/lua/5.4/?.lua;/opt/homebrew/share/lua/5.4/?/init.lua;/opt/homebrew/lib/lua/5.4/?.lua;/opt/homebrew/lib/lua/5.4/?/init.lua;./?.lua;./?/init.lua;/Users/ovidiu/.luarocks/share/lua/5.4/?.lua;/Users/ovidiu/.luarocks/share/lua/5.4/?/init.lua LUA_CPATH=/opt/homebrew/lib/lua/5.4/?.so;/opt/homebrew/lib/lua/5.4/loadall.so;./?.so;/Users/ovidiu/.luarocks/lib/lua/5.4/?.so CC=/usr/bin/gcc VISUAL=/Users/ovidiu/.local/bin/mvim EDITOR=/Users/ovidiu/.local/bin/mvim LC_ALL=en_US.UTF-8 LC_TIME=en_GB.UTF-8 DISABLE_AUTO_TITLE=true GIT_PAGER=less -SRX LESS=iXM PIP_REQUIRE_VIRTUALENV=true FZF_DEFAULT_OPTS=--bind 'ctrl-y:accept' PYENV_ROOT=/Users/ovidiu/.pyenv PYENV_SHELL=zsh POSH_THEME= POSH_SHELL_VERSION=5.9 POSH_PID=68252 POWERLINE_COMMAND=oh-my-posh CONDA_PROMPT_MODIFIER=false POSH_PROMPT_COUNT=5 ZLE_RPROMPT_INDENT=0 OSTYPE=darwin23.0 POSH_JOBS=0 POETRY_ACTIVE=1 _=/opt/homebrew/bin/oh-my-posh]
[TRACE] 14:21:24.163 terminal.go:GOOS() - 125ns
[TRACE] 14:21:24.163 terminal.go:PathSeparator() - 3.834µs
[TRACE] 14:21:24.163 terminal.go:GOOS() - 42ns
[DEBUG] 14:21:24.163 terminal.go:Pwd:190 ‚Üí /Users/ovidiu
[TRACE] 14:21:24.163 terminal.go:Pwd() - 42.292µs
[DEBUG] 14:21:24.163 terminal_unix.go:IsWsl:35 ‚Üí false
[TRACE] 14:21:24.163 terminal_unix.go:IsWsl() - 2.75µs
[TRACE] 14:21:24.163 terminal.go:GOOS() - 42ns
[TRACE] 14:21:24.163 terminal.go:GOOS() - 42ns
[TRACE] 14:21:24.163 terminal.go:GOOS() - 41ns
[TRACE] 14:21:24.163 terminal.go:GOOS() - 41ns
[TRACE] 14:21:24.163 terminal.go:GOOS() - 83ns
[TRACE] 14:21:24.163 terminal.go:GOOS() - 83ns
[TRACE] 14:21:24.163 terminal.go:GOOS() - 83ns
[TRACE] 14:21:24.163 terminal.go:GOOS() - 42ns
[DEBUG] 14:21:24.163 terminal.go:User:331 ‚Üí ovidiu
[TRACE] 14:21:24.163 terminal.go:User() - 2.792µs
[DEBUG] 14:21:24.163 terminal.go:Host:348 ‚Üí Ovidius-MacBook-Air
[TRACE] 14:21:24.163 terminal.go:Host() - 10.083µs
[TRACE] 14:21:24.163 terminal.go:GOOS() - 42ns
[DEBUG] 14:21:24.163 terminal.go:Getenv:165 ‚Üí 2
[TRACE] 14:21:24.163 terminal.go:Getenv(SHLVL) - 3.791µs
[TRACE] 14:21:24.163 terminal.go:TemplateCache() - 152.667µs
[TRACE] 14:21:24.163 terminal.go:Shell() - 84ns
[DEBUG] 14:21:24.163 terminal.go:Getenv:165 ‚Üí NO DATA
[TRACE] 14:21:24.163 terminal.go:Getenv(POSH_CURSOR_LINE) - 6.25µs
[DEBUG] 14:21:24.163 terminal.go:Getenv:165 ‚Üí NO DATA
[TRACE] 14:21:24.163 terminal.go:Getenv(POSH_CURSOR_COLUMN) - 2µs
[TRACE] 14:21:24.163 terminal.go:Flags() - 41ns
[TRACE] 14:21:24.163 terminal.go:Flags() - 83ns
[TRACE] 14:21:24.163 terminal.go:Flags() - 83ns
[DEBUG] 14:21:24.163 status.go:Init:53 ‚Üí {{ .Code }}
[TRACE] 14:21:24.163 terminal.go:Flags() - 125ns
[TRACE] 14:21:24.163 terminal.go:Pwd() - 83ns
[TRACE] 14:21:24.163 terminal.go:GOOS() - 42ns
[DEBUG] 14:21:24.163 segment.go:SetEnabled:115 ‚Üí segment: Status
[TRACE] 14:21:24.163 terminal.go:StatusCodes() - 84ns
[DEBUG] 14:21:24.163 text.go:Render:80 ‚Üí rendering template: {{ .Code }}
[TRACE] 14:21:24.163 terminal.go:Flags() - 41ns
[TRACE] 14:21:24.163 terminal.go:Pwd() - 83ns
[TRACE] 14:21:24.163 terminal.go:GOOS() - 83ns
[DEBUG] 14:21:24.163 segment.go:SetEnabled:115 ‚Üí segment: Path
[DEBUG] 14:21:24.163 path.go:149 ‚Üí display_cygpath: false
[TRACE] 14:21:24.163 terminal.go:GOOS() - 42ns
[TRACE] 14:21:24.163 terminal.go:GOOS() - 42ns
[TRACE] 14:21:24.163 terminal.go:PathSeparator() - 2.25µs
[TRACE] 14:21:24.163 terminal.go:Pwd() - 41ns
[TRACE] 14:21:24.163 terminal.go:Shell() - 84ns
[TRACE] 14:21:24.163 terminal.go:Shell() - 42ns
[TRACE] 14:21:24.163 terminal.go:GOOS() - 83ns
[TRACE] 14:21:24.163 terminal.go:Flags() - 167ns
[DEBUG] 14:21:24.163 path.go:setMappedLocations:563 ‚Üí mapped_locations_enabled: true
[DEBUG] 14:21:24.163 path.go:setMappedLocations:564 ‚Üí ÔÄì
[DEBUG] 14:21:24.163 path.go:setMappedLocations:565 ‚Üí ÔÄì
[TRACE] 14:21:24.163 terminal.go:GOOS() - 41ns
[TRACE] 14:21:24.163 terminal.go:Pwd() - 167ns
[TRACE] 14:21:24.163 terminal.go:PathSeparator() - 2.375µs
[TRACE] 14:21:24.163 terminal.go:GOOS() - 83ns
[TRACE] 14:21:24.163 terminal.go:GOOS() - 42ns
[DEBUG] 14:21:24.163 segment.go:SetEnabled:115 ‚Üí segment: Git
[DEBUG] 14:21:24.163 terminal_unix.go:IsWsl:35 ‚Üí false
[TRACE] 14:21:24.163 terminal_unix.go:IsWsl() - 3.875µs
[TRACE] 14:21:24.163 terminal.go:GOOS() - 41ns
[TRACE] 14:21:24.163 terminal_unix.go:IsWsl2() - 7.292µs
[TRACE] 14:21:24.163 terminal.go:GOOS() - 42ns
[TRACE] 14:21:24.163 terminal.go:Flags() - 167ns
[TRACE] 14:21:24.163 terminal.go:GOOS() - 83ns
[DEBUG] 14:21:24.163 path.go:setMappedLocations:566 ‚Üí ~
[DEBUG] 14:21:24.163 path.go:setMappedLocations:571 ‚Üí mapped_locations: map[]
[TRACE] 14:21:24.163 terminal.go:GOOS() - 42ns
[TRACE] 14:21:24.163 terminal.go:PathSeparator() - 2.25µs
[TRACE] 14:21:24.164 terminal.go:GOOS() - 83ns
[TRACE] 14:21:24.164 terminal.go:GOOS() - 83ns
[TRACE] 14:21:24.164 terminal.go:Pwd() - 125ns
[TRACE] 14:21:24.164 terminal.go:GOOS() - 41ns
[TRACE] 14:21:24.164 terminal.go:GOOS() - 83ns
[TRACE] 14:21:24.164 terminal.go:GOOS() - 42ns
[TRACE] 14:21:24.164 terminal.go:PathSeparator() - 2.25µs
[TRACE] 14:21:24.164 terminal.go:GOOS() - 41ns
[TRACE] 14:21:24.164 terminal.go:GOOS() - 83ns
[DEBUG] 14:21:24.164 segment.go:SetEnabled:115 ‚Üí segment: Root
[TRACE] 14:21:24.164 terminal.go:GOOS() - 42ns
[TRACE] 14:21:24.164 terminal.go:GOOS() - 42ns
[TRACE] 14:21:24.164 terminal_unix.go:Root() - 583ns
[TRACE] 14:21:24.164 terminal.go:GOOS() - 83ns
[TRACE] 14:21:24.164 terminal.go:GOOS() - 41ns
[TRACE] 14:21:24.164 terminal.go:GOOS() - 42ns
[TRACE] 14:21:24.164 terminal.go:GOOS() - 42ns
[TRACE] 14:21:24.164 terminal.go:Flags() - 42ns
[DEBUG] 14:21:24.164 path.go:colorizePath:740 ‚Üí cycle: []
[DEBUG] 14:21:24.164 path.go:getFolderSeparator:273 ‚Üí NO DATA
[DEBUG] 14:21:24.164 path.go:getFolderSeparator:275 ‚Üí /
[DEBUG] 14:21:24.164 path.go:colorizePath:743 ‚Üí cycle_folder_separator: false
[DEBUG] 14:21:24.164 terminal.go:CommandPath:390 ‚Üí /opt/homebrew/bin/git
[DEBUG] 14:21:24.164 path.go:colorizePath:744 ‚Üí %s
[TRACE] 14:21:24.164 terminal.go:CommandPath(git) - 74.208µs
[DEBUG] 14:21:24.164 path.go:colorizePath:746 ‚Üí %s
[DEBUG] 14:21:24.164 path.go:colorizePath:747 ‚Üí %s
[TRACE] 14:21:24.164 terminal.go:HasCommand(git) - 77.542µs
[DEBUG] 14:21:24.164 path.go:colorizePath:748 ‚Üí %s
[TRACE] 14:21:24.164 terminal.go:Pwd() - 83ns
[TRACE] 14:21:24.164 terminal.go:TemplateCache() - 208ns
[DEBUG] 14:21:24.164 git.go:shouldDisplay:285 ‚Üí fetch_bare_info: false
[TRACE] 14:21:24.164 terminal.go:GOOS() - 83ns
[TRACE] 14:21:24.164 terminal.go:StackCount() - 42ns
[TRACE] 14:21:24.164 terminal.go:Pwd() - 84ns
[TRACE] 14:21:24.164 terminal.go:TemplateCache() - 209ns
[DEBUG] 14:21:24.164 status.go:Enabled:42 ‚Üí always_enabled: true
[TRACE] 14:21:24.164 terminal.go:TemplateCache() - 83ns
[DEBUG] 14:21:24.164 terminal.go:ResolveSymlink:287 ‚Üí /Users/ovidiu
[TRACE] 14:21:24.164 terminal.go:ResolveSymlink(/Users/ovidiu) - 24.166µs
[TRACE] 14:21:24.164 terminal_unix.go:DirIsWritable(/Users/ovidiu) - 24.875µs
[TRACE] 14:21:24.164 terminal.go:Flags() - 125ns
[TRACE] 14:21:24.164 terminal.go:TemplateCache() - 83ns
[TRACE] 14:21:24.164 terminal.go:Pwd() - 42ns
[TRACE] 14:21:24.164 terminal.go:GOOS() - 42ns
[DEBUG] 14:21:24.164 segment.go:SetEnabled:115 ‚Üí segment: Session
[DEBUG] 14:21:24.164 terminal.go:Getenv:165 ‚Üí NO DATA
[TRACE] 14:21:24.164 terminal.go:Getenv(SSH_CONNECTION) - 2.709µs
[DEBUG] 14:21:24.164 terminal.go:Getenv:165 ‚Üí NO DATA
[ERROR] 14:21:24.164 terminal.go:HasParentFilePath:554 ‚Üí stat .git: no such file or directory
[TRACE] 14:21:24.164 terminal.go:HasParentFilePath(.git) - 62.125µs
[DEBUG] 14:21:24.164 terminal_unix.go:Platform:92 ‚Üí darwin
[DEBUG] 14:21:24.168 terminal.go:RunCommand:368 ‚Üí ovidiu                        Sep  7 14:21
[TRACE] 14:21:24.168 terminal.go:RunCommand(who am i) - 4.655042ms
[TRACE] 14:21:24.168 terminal.go:TemplateCache() - 3.375µs
[DEBUG] 14:21:24.168 text.go:Render:80 ‚Üí rendering template:  {{ if gt .Code 0 }}ÔÄç{{ else }}ÔÄå{{ end }} 
[TRACE] 14:21:24.168 terminal.go:Flags() - 84ns
[DEBUG] 14:21:24.168 text.go:Render:80 → rendering template:   {{ path .Path .Location }} 
[TRACE] 14:21:24.168 terminal.go:Flags() - 42ns
[DEBUG] 14:21:24.169 text.go:Render:80 ‚Üí rendering template:  {{ if .SSHSession }}ÓÆ© {{ end }}{{ .UserName }} 
[TRACE] 14:21:24.169 terminal.go:Flags() - 83ns
[TRACE] 14:21:24.169 terminal.go:TemplateCache() - 125ns
[TRACE] 14:21:24.169 terminal.go:TemplateCache() - 125ns
[TRACE] 14:21:24.169 terminal.go:TemplateCache() - 166ns
[DEBUG] 14:21:24.169 text.go:Render:80 ‚Üí rendering template: powerline
[TRACE] 14:21:24.169 terminal.go:Flags() - 42ns
[DEBUG] 14:21:24.169 text.go:Render:80 ‚Üí rendering template: powerline
[TRACE] 14:21:24.169 terminal.go:Flags() - 42ns
[DEBUG] 14:21:24.169 text.go:Render:80 ‚Üí rendering template: diamond
[TRACE] 14:21:24.169 terminal.go:Flags() - 41ns
[DEBUG] 14:21:24.169 text.go:Render:80 ‚Üí rendering template: powerline
[TRACE] 14:21:24.169 terminal.go:Flags() - 83ns
[DEBUG] 14:21:24.169 text.go:Render:80 ‚Üí rendering template: {{ if gt .Code 0 }}p:red{{ end }}
[TRACE] 14:21:24.169 terminal.go:Flags() - 41ns
[TRACE] 14:21:24.169 terminal.go:TemplateCache() - 83ns
[DEBUG] 14:21:24.169 text.go:Render:80 ‚Üí rendering template: diamond
[TRACE] 14:21:24.169 terminal.go:Flags() - 41ns
[DEBUG] 14:21:24.169 text.go:Render:80 ‚Üí rendering template: {{ if gt .Code 0 }}p:red{{ end }}
[TRACE] 14:21:24.169 terminal.go:Flags() - 42ns
[TRACE] 14:21:24.169 terminal.go:TemplateCache() - 42ns
[TRACE] 14:21:24.169 terminal.go:Shell() - 83ns
[TRACE] 14:21:24.169 terminal.go:Shell() - 42ns
[TRACE] 14:21:24.169 terminal.go:Flags() - 42ns
[TRACE] 14:21:24.169 terminal.go:Pwd() - 83ns
[TRACE] 14:21:24.169 terminal.go:Flags() - 84ns
[DEBUG] 14:21:24.169 segment.go:SetEnabled:115 ‚Üí segment: Time
[DEBUG] 14:21:24.169 time.go:Enabled:29 ‚Üí 15:04:05
[TRACE] 14:21:24.169 terminal.go:TemplateCache() - 83ns
[TRACE] 14:21:24.169 terminal.go:Pwd() - 84ns
[TRACE] 14:21:24.169 terminal.go:Flags() - 125ns
[TRACE] 14:21:24.169 terminal.go:GOOS() - 41ns
[TRACE] 14:21:24.169 terminal.go:Flags() - 208ns
[DEBUG] 14:21:24.169 segment.go:SetEnabled:115 ‚Üí segment: Go
[DEBUG] 14:21:24.169 python.go:Init:61 ‚Üí files
[TRACE] 14:21:24.169 terminal.go:Pwd() - 42ns
[TRACE] 14:21:24.169 terminal.go:GOOS() - 42ns
[TRACE] 14:21:24.169 terminal.go:Pwd() - 84ns
[DEBUG] 14:21:24.169 language.go:Enabled:109 ‚Üí extensions: [*.go go.mod]
[DEBUG] 14:21:24.169 segment.go:SetEnabled:115 ‚Üí segment: Node
[TRACE] 14:21:24.169 terminal.go:GOOS() - 84ns
[DEBUG] 14:21:24.169 language.go:Enabled:110 ‚Üí folders: []
[DEBUG] 14:21:24.169 segment.go:SetEnabled:115 ‚Üí segment: Python
[DEBUG] 14:21:24.169 language.go:Enabled:117 ‚Üí home_enabled: false
[DEBUG] 14:21:24.169 language.go:Enabled:109 ‚Üí extensions: [*.js *.ts package.json .nvmrc pnpm-workspace.yaml .pnpmfile.cjs .vue]
[TRACE] 14:21:24.169 terminal.go:Pwd() - 41ns
[DEBUG] 14:21:24.169 language.go:Enabled:109 ‚Üí extensions: [*.py *.ipynb pyproject.toml venv.bak]
[DEBUG] 14:21:24.169 language.go:Enabled:110 ‚Üí folders: []
[DEBUG] 14:21:24.169 language.go:Enabled:110 ‚Üí folders: [.venv venv[TRACE] 14:21:24.169 terminal.go:Pwd() - 83ns
Üí home_enabled: false
[TRACE] 14:21:24.169 terminal.go:Flags() - 125ns
[TRACE] 14:21:24.169 terminal.go:Pwd() - 42ns
[TRACE] 14:21:24.169 terminal.go:Pwd() - 42ns
[TRACE] 14:21:24.169 terminal.go:GOOS() - 41ns
[DEBUG] 14:21:24.169 segment.go:SetEnabled:115 ‚Üí segment: Shell
[DEBUG] 14:21:24.169 shell.go:Enabled:28 ‚Üí mapped_shell_names: map[]
[TRACE] 14:21:24.169 terminal.go:Shell() - 41ns
[TRACE] 14:21:24.169 terminal.go:Flags() - 41ns
[TRACE] 14:21:24.169 terminal.go:TemplateCache() - 83ns
[DEBUG] 14:21:24.169 text.go:Render:80 ‚Üí rendering template: at <p:blue><b>{{ .CurrentDate | date "15:04:05" }}</b></>
[TRACE] 14:21:24.169 terminal.go:Flags() - 41ns
[DEBUG] 14:21:24.169 text.go:Render:80 ‚Üí rendering template: in <p:blue><b>{{ .Name }}</b></> 
[TRACE] 14:21:24.169 terminal.go:Flags() - 42ns
[TRACE] 14:21:24.170 terminal.go:TemplateCache() - 125ns
[TRACE] 14:21:24.170 terminal.go:TemplateCache() - 125ns
[DEBUG] 14:21:24.170 text.go:Render:80 ‚Üí rendering template: plain
[TRACE] 14:21:24.170 terminal.go:Flags() - 41ns
[DEBUG] 14:21:24.170 text.go:Render:80 ‚Üí rendering template: plain
[TRACE] 14:21:24.170 terminal.go:Flags() - 84ns
[DEBUG] 14:21:24.170 text.go:Render:80 ‚Üí rendering template: plain
[TRACE] 14:21:24.170 terminal.go:Flags() - 42ns
[DEBUG] 14:21:24.170 text.go:Render:80 ‚Üí rendering template: plain
[TRACE] 14:21:24.170 terminal.go:Flags() - 42ns
[DEBUG] 14:21:24.170 text.go:Render:80 ‚Üí rendering template: plain
[TRACE] 14:21:24.170 terminal.go:Flags() - 83ns
[TRACE] 14:21:24.170 terminal.go:Shell() - 42ns
[TRACE] 14:21:24.170 terminal.go:Shell() - 42ns
[TRACE] 14:21:24.170 terminal.go:Flags() - 42ns
[TRACE] 14:21:24.170 terminal.go:Shell() - 42ns
[TRACE] 14:21:24.170 terminal.go:Flags() - 41ns
[DEBUG] 14:21:24.170 terminal.go:Getenv:165 ‚Üí NO DATA
[TRACE] 14:21:24.170 terminal.go:Getenv(LOCALAPPDATA) - 2.708µs
[DEBUG] 14:21:24.170 terminal.go:Getenv:165 ‚Üí NO DATA
[TRACE] 14:21:24.170 terminal.go:Getenv(OMP_CACHE_DIR) - 2.125µs
[DEBUG] 14:21:24.170 terminal.go:Getenv:165 ‚Üí NO DATA
[TRACE] 14:21:24.170 terminal.go:Getenv(XDG_CACHE_HOME) - 1.875µs
[TRACE] 14:21:24.170 terminal.go:CachePath() - 27.25µs
[TRACE] 14:21:24.170 terminal.go:Flags() - 84ns
ovidiu commented 2 months ago

I should also mention that the "regular" way of creating and activating python virtual enviroments (python3 -m venv venv; source venv/bin/activate) works fine.

JanDeDobbeleer commented 2 months ago

Duplicate of this.