JanDeDobbeleer / oh-my-posh

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

Pipenv Shell Activation Error #5187

Closed wouter-intveld closed 1 month ago

wouter-intveld commented 1 month ago

Code of Conduct

What happened?

When running pipenv shell, pipenv attempts to activate the virtual environment but encounters an error. This issue does not occur when Oh My Posh is disabled or when using the default theme configuration.

Steps to Reproduce

Expected Behavior

Pipenv should successfully activate the virtual environment without errors.

Actual Behavior

Pipenv attempts to activate the virtual environment but fails with the following error message:

❯ pipenv shell
Launching subshell in virtual environment...
 . /home/abcde/.local/share/virtualenvs/abcde-tR1vbTAD/bin/activate
❯ 1vbTAD/bin/activate
zsh: no such file or directory: 1vbTAD/bin/activate

Theme

"$schema" = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json"
final_space = true
version = 2

[palette]
blue = "#8CAAEE"
closer = "p:os"
green = "#a6d189"
lavender = "#BABBF1"
os = "#ACB0BE"
peach = "#fe640b"
pink = "#F4B8E4"
red = "#d20f39"
teal = "#81c8be"
yellow = "#e5c890"

[[blocks]]
alignment = "left"
type = "prompt"
newline = true

[[blocks.segments]]
foreground = "p:blue"
style = "plain"
template = "{{ .Path }} "
type = "path"

[blocks.segments.properties]
folder_icon = ".."
home_icon = "~"
style = "agnoster_short"
max_depth = 3

[[blocks.segments]]
foreground = "p:lavender"
style = "plain"
type = "git"
template = "{{ .UpstreamIcon }}{{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}* {{ .Working.String }}{{ end }} <cyan>{{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}</><blue>{{ if gt .StashCount 0 }} *{{ .StashCount }}{{ end }}</>"

[blocks.segments.properties]
branch_icon = " "
cherry_pick_icon = " "
commit_icon = " "
fetch_status = true
fetch_upstream_icon = true
merge_icon = " "
no_commits_icon = " "
rebase_icon = " "
revert_icon = " "
tag_icon = " "

[[blocks.segments]]
type = "node"
style = "plain"
foreground = "p:green"

[blocks.segments.properties]
fetch_package_manager = true

[[blocks.segments]]
type = "go"
style = "plain"
foreground = "p:teal"
template = "{{ if .Error }}{{ .Error }}{{ else }} {{ .Full }}{{ end }}"

[[blocks.segments]]
type = "python"
style = "plain"
foreground = "p:blue"
template = "{{ if .Error }}{{ .Error }}{{ else }}  {{ if .Venv }}{{ .Venv }} {{ end }}{{ .Full }}{{ end }}"

[blocks.segments.properties]
fetch_virtual_env = true

[[blocks.segments]]
type = "aws"
style = "plain"
foreground = "p:peach"
foreground_templates = ["{{if contains \"prod\" .Profile}}p:red{{end}}"]
template = "  {{.Profile}}{{if .Region}} @{{.Region}}{{end}}"

[blocks.segments.properties]
display_default = false

[[blocks]]
type = "rprompt"
overflow = "hidden"

[[blocks.segments]]
type = "session"
style = "plain"
template = "{{ if .SSHSession }}  {{ end }}"

[[blocks.segments]]
type = "executiontime"
style = "plain"
foreground = "p:yellow"
background = "transparent"
template = "{{ .FormattedMs }} "

[blocks.segments.properties]
threshold = 500

[[blocks]]
type = "prompt"
alignment = "left"
newline = true

[[blocks.segments]]
type = "text"
style = "plain"
foreground = "p:green"
foreground_templates = ["{{if gt .Code 0}}p:red{{end}}"]
background = "transparent"
template = "❯"

[transient_prompt]
foreground = "p:green"
foreground_templates = ["{{if gt .Code 0}}p:red{{end}}"]
background = "transparent"
template = "❯ "

[secondary_prompt]
foreground = "p:green"
background = "transparent"
template = "❯❯ "

What OS are you seeing the problem on?

Linux

Which shell are you using?

zsh

Log output

Version: 21.16.1

Shell: zsh (5.9)

Prompt:

~/dotfiles   master* ~3 
❯ 

Segments:

ConsoleTitle(false)                        -   0 ms
Path(true)                                 -   1 ms
Git(true)                                  -  11 ms
Session(false)                             -   1 ms
Executiontime(false)                       -   0 ms
Text(true)                                 -   0 ms

Run duration: 18.797331ms

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

Config path: /home/abcde/.config/ohmyposh/default.toml

Logs:

[DEBUG] 09:42:46.261 shell.go:Getenv:326 → WezTerm
[TRACE] 09:42:46.261 shell.go:Getenv(TERM_PROGRAM) - 61.221µs
[DEBUG] 09:42:46.261 shell.go:Getenv:326 → NO DATA
[TRACE] 09:42:46.261 shell.go:Getenv(OMP_CACHE_DIR) - 12.42µs
[DEBUG] 09:42:46.261 shell.go:Getenv:326 → NO DATA
[TRACE] 09:42:46.261 shell.go:Getenv(XDG_CACHE_HOME) - 2.51µs
[TRACE] 09:42:46.261 shell_unix.go:CachePath() - 30.74µs
[DEBUG] 09:42:46.263 shell.go:Getenv:326 → /home/abcde/.config/ohmyposh/default.toml
[TRACE] 09:42:46.263 shell.go:Getenv(POSH_THEME) - 5.5µs
[DEBUG] 09:42:46.263 shell_unix.go:Platform:87 → manjaro
[TRACE] 09:42:46.263 shell.go:resolveConfigPath() - 13.63µs
[TRACE] 09:42:46.263 shell.go:Init() - 1.538873ms
[TRACE] 09:42:46.263 shell.go:Flags() - 80ns
[TRACE] 09:42:46.263 config.go:loadConfig() - 237.203µs
[TRACE] 09:42:46.263 shell.go:Flags() - 40ns
[DEBUG] 09:42:46.263 shell.go:Getenv:326 → NO DATA
[TRACE] 09:42:46.263 shell.go:Getenv(OMP_CACHE_DISABLED) - 7.75µs
[DEBUG] 09:42:46.263 shell.go:Shell:601 → no shell name provided in flags, trying to detect it
[DEBUG] 09:42:46.264 shell.go:Shell:609 → process name: zsh
[TRACE] 09:42:46.264 shell.go:Shell() - 1.046236ms
[DEBUG] 09:42:46.264 shell.go:Getenv:326 → 5.9
[TRACE] 09:42:46.264 shell.go:Getenv(POSH_SHELL_VERSION) - 13.06µs
[DEBUG] 09:42:46.264 debug.go:PrintDebug:22 → Segment: Title
[DEBUG] 09:42:46.264 text.go:Render:72 → Rendering template: 
[DEBUG] 09:42:46.264 shell.go:Getenv:326 → 44
[TRACE] 09:42:46.264 shell.go:Getenv(POSH_CURSOR_LINE) - 3.11µs
[DEBUG] 09:42:46.264 shell.go:Getenv:326 → 1
[TRACE] 09:42:46.264 shell.go:Getenv(POSH_CURSOR_COLUMN) - 2.7µs
[TRACE] 09:42:46.264 shell.go:Flags() - 30ns
[TRACE] 09:42:46.264 shell.go:Flags() - 30ns
[TRACE] 09:42:46.264 shell.go:Shell() - 60ns
[TRACE] 09:42:46.264 shell.go:Shell() - 30ns
[TRACE] 09:42:46.264 shell.go:Flags() - 30ns
[TRACE] 09:42:46.264 shell.go:Flags() - 130ns
[TRACE] 09:42:46.264 shell.go:GOOS() - 100ns
[DEBUG] 09:42:46.264 shell.go:Pwd:356 → /home/abcde/dotfiles
[TRACE] 09:42:46.264 shell.go:Pwd() - 25.65µs
[TRACE] 09:42:46.264 shell.go:GOOS() - 30ns
[DEBUG] 09:42:46.264 segment.go:SetEnabled:560 → Segment: Aws
[DEBUG] 09:42:46.264 properties.go:GetBool:22 → display_default: false
[DEBUG] 09:42:46.264 shell.go:Getenv:326 → NO DATA
[TRACE] 09:42:46.264 shell.go:Pwd() - 120ns
[TRACE] 09:42:46.264 shell.go:Getenv(AWS_VAULT) - 2.48µs
[TRACE] 09:42:46.264 shell.go:GOOS() - 50ns
[DEBUG] 09:42:46.264 shell.go:Getenv:326 → NO DATA
[TRACE] 09:42:46.264 shell.go:Getenv(AWS_DEFAULT_PROFILE) - 2.35µs
[DEBUG] 09:42:46.264 shell.go:Getenv:326 → NO DATA
[DEBUG] 09:42:46.264 segment.go:SetEnabled:560 → Segment: Node
[TRACE] 09:42:46.264 shell.go:Getenv(AWS_PROFILE) - 2.28µs
[DEBUG] 09:42:46.264 shell.go:Getenv:326 → NO DATA
[TRACE] 09:42:46.264 shell.go:Getenv(AWS_REGION) - 2.43µs
[DEBUG] 09:42:46.264 shell.go:Getenv:326 → NO DATA
[TRACE] 09:42:46.264 shell.go:Getenv(AWS_DEFAULT_REGION) - 2.11µs
[TRACE] 09:42:46.264 shell.go:Flags() - 640ns
[DEBUG] 09:42:46.264 shell.go:Getenv:326 → NO DATA
[TRACE] 09:42:46.264 shell.go:Getenv(AWS_CONFIG_FILE) - 5.6µs
[DEBUG] 09:42:46.264 properties.go:GetStringArray:52 → extensions: [*.js *.ts package.json .nvmrc pnpm-workspace.yaml .pnpmfile.cjs .vue]
[DEBUG] 09:42:46.264 properties.go:GetStringArray:52 → folders: []
[DEBUG] 09:42:46.264 properties.go:GetBool:22 → home_enabled: false
[TRACE] 09:42:46.264 shell.go:Pwd() - 50ns
[DEBUG] 09:42:46.264 properties.go:GetString:28 → files
[DEBUG] 09:42:46.264 properties.go:GetBool:22 → fetch_package_manager: true
[TRACE] 09:42:46.264 shell.go:Pwd() - 50ns
[TRACE] 09:42:46.264 shell.go:Flags() - 160ns
[TRACE] 09:42:46.264 shell.go:Pwd() - 370ns
[TRACE] 09:42:46.264 shell.go:GOOS() - 50ns
[DEBUG] 09:42:46.264 segment.go:SetEnabled:560 → Segment: Go
[DEBUG] 09:42:46.264 properties.go:GetStringArray:52 → extensions: [*.go go.mod]
[DEBUG] 09:42:46.264 properties.go:GetStringArray:52 → folders: []
[DEBUG] 09:42:46.264 properties.go:GetString:28 → environment
[DEBUG] 09:42:46.264 properties.go:GetBool:22 → home_enabled: false
[DEBUG] 09:42:46.265 shell.go:HasFilesInDir:409 → false
[DEBUG] 09:42:46.265 properties.go:GetKeyValueMap:46 → mapped_locations: map[]
[TRACE] 09:42:46.265 shell.go:HasFilesInDir(*.ts) - 8.72µs
[TRACE] 09:42:46.265 shell.go:Pwd() - 220ns
[TRACE] 09:42:46.265 shell.go:GOOS() - 50ns
[DEBUG] 09:42:46.265 segment.go:SetEnabled:560 → Segment: Git
[DEBUG] 09:42:46.265 shell_unix.go:IsWsl:35 → false
[DEBUG] 09:42:46.265 shell.go:CommandPath:553 → /usr/bin/python
[TRACE] 09:42:46.265 shell_unix.go:IsWsl() - 7.46µs
[TRACE] 09:42:46.265 shell.go:CommandPath(python) - 64.071µs
[TRACE] 09:42:46.265 shell_unix.go:IsWsl2() - 11.57µs
[TRACE] 09:42:46.265 shell.go:GOOS() - 30ns
[TRACE] 09:42:46.265 shell.go:Pwd() - 250ns
[DEBUG] 09:42:46.265 properties.go:GetString:28 → files
[TRACE] 09:42:46.265 shell.go:Pwd() - 80ns
[DEBUG] 09:42:46.265 shell.go:CommandPath:553 → /usr/bin/git
[TRACE] 09:42:46.265 shell.go:CommandPath(git) - 42.321µs
[DEBUG] 09:42:46.265 shell.go:HasFilesInDir:409 → false
[TRACE] 09:42:46.265 shell.go:HasCommand(git) - 45.921µs
[TRACE] 09:42:46.265 shell.go:Pwd() - 90ns
[TRACE] 09:42:46.265 shell.go:HasFilesInDir(*.go) - 8.34µs
[TRACE] 09:42:46.265 shell.go:Pwd() - 60ns
[TRACE] 09:42:46.265 shell.go:GOOS() - 150ns
[TRACE] 09:42:46.265 shell.go:GOOS() - 130ns
[DEBUG] 09:42:46.265 properties.go:GetStringArray:52 → exclude_folders: []
[TRACE] 09:42:46.265 shell.go:Pwd() - 50ns
[TRACE] 09:42:46.265 shell.go:GOOS() - 40ns
[TRACE] 09:42:46.265 shell.go:GOOS() - 30ns
[DEBUG] 09:42:46.265 shell.go:HasFilesInDir:409 → false
[DEBUG] 09:42:46.265 properties.go:GetString:28 → NO DATA
[DEBUG] 09:42:46.265 properties.go:GetBool:22 → fetch_user: false
[TRACE] 09:42:46.265 shell.go:HasFilesInDir(package.json) - 7.21µs
[TRACE] 09:42:46.265 shell.go:GOOS() - 30ns
[TRACE] 09:42:46.265 shell.go:Pwd() - 40ns
[TRACE] 09:42:46.265 shell.go:GOOS() - 150ns
[DEBUG] 09:42:46.265 shell.go:HasFilesInDir:409 → false
[DEBUG] 09:42:46.265 properties.go:GetInt:40 → max_depth: 3
[TRACE] 09:42:46.265 shell.go:HasFilesInDir(.nvmrc) - 4.27µs
[DEBUG] 09:42:46.265 properties.go:GetString:28 → ..
[TRACE] 09:42:46.265 shell.go:Pwd() - 50ns
[TRACE] 09:42:46.265 shell.go:GOOS() - 30ns
[DEBUG] 09:42:46.265 properties.go:GetBool:22 → hide_root_location: false
[TRACE] 09:42:46.265 shell.go:GOOS() - 40ns
[TRACE] 09:42:46.265 shell.go:GOOS() - 120ns
[DEBUG] 09:42:46.265 properties.go:GetStringArray:52 → cycle: []
[TRACE] 09:42:46.265 shell.go:GOOS() - 70ns
[DEBUG] 09:42:46.265 properties.go:GetString:28 → NO DATA
[TRACE] 09:42:46.265 shell.go:GOOS() - 80ns
[DEBUG] 09:42:46.265 shell.go:HasFilesInDir:409 → false
[DEBUG] 09:42:46.265 properties.go:GetString:28 → /
[TRACE] 09:42:46.265 shell.go:GOOS() - 90ns
[DEBUG] 09:42:46.265 properties.go:GetBool:22 → cycle_folder_separator: false
[DEBUG] 09:42:46.266 shell.go:Getenv:326 → NO DATA
[TRACE] 09:42:46.266 shell.go:Pwd() - 140ns
[TRACE] 09:42:46.266 shell.go:Getenv(POSH_GIT_STATUS) - 10.36µs
[DEBUG] 09:42:46.266 properties.go:GetString:28 → %s
[DEBUG] 09:42:46.266 properties.go:GetBool:22 → fetch_status: true
[DEBUG] 09:42:46.266 properties.go:GetString:28 → %s
[DEBUG] 09:42:46.266 shell.go:HasFilesInDir:409 → false
[DEBUG] 09:42:46.266 properties.go:GetString:28 → %s
[DEBUG] 09:42:46.266 properties.go:GetStringArray:52 → ignore_status: []
[DEBUG] 09:42:46.266 properties.go:GetString:28 → %s
[TRACE] 09:42:46.266 shell.go:GOOS() - 40ns
[TRACE] 09:42:46.266 shell.go:HasFilesInDir(.pnpmfile.cjs) - 10.2µs
[TRACE] 09:42:46.266 shell.go:Pwd() - 80ns
[DEBUG] 09:42:46.266 properties.go:GetKeyValueMap:46 → status_formats: map[]
[TRACE] 09:42:46.266 shell.go:Pwd() - 90ns
[TRACE] 09:42:46.266 shell_unix.go:Root() - 350ns
[DEBUG] 09:42:46.266 properties.go:GetKeyValueMap:46 → untracked_modes: map[]
[DEBUG] 09:42:46.266 shell.go:HasFilesInDir:409 → false
[TRACE] 09:42:46.266 shell.go:Shell() - 80ns
[DEBUG] 09:42:46.266 properties.go:GetKeyValueMap:46 → ignore_submodules: map[]
[TRACE] 09:42:46.266 shell.go:StatusCodes() - 80ns
[TRACE] 09:42:46.266 shell.go:HasFilesInDir(.vue) - 5.951µs
[DEBUG] 09:42:46.266 shell_unix.go:IsWsl:35 → false
[TRACE] 09:42:46.266 shell_unix.go:IsWsl() - 3.46µs
[DEBUG] 09:42:46.266 shell.go:TemplateCache:782 ↓
    environment: [COLORTERM=truecolor DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus DEBUGINFOD_URLS=https://debuginfod.archlinux.org  DESKTOP_SESSION=plasma DESKTOP_STARTUP_ID=Doom;1719732588;658370;1486_TIME487745365 DISPLAY=:0 GRADLE_HOME=/usr/share/java/gradle GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/abcde/.gtkrc-2.0:/home/abcde/.config/gtkrc-2.0 GTK3_MODULES=xapp-gtk3-module GTK_MODULES=canberra-gtk-module GTK_RC_FILES=/etc/gtk/gtkrc:/home/abcde/.gtkrc:/home/abcde/.config/gtkrc HOME=/home/abcde ICEAUTHORITY=/run/user/1000/iceauth_eNxIhH INVOCATION_ID=d66b473c064246b8823d362075424186 JOURNAL_STREAM=9:10992 KDE_APPLICATIONS_AS_SCOPE=1 KDE_FULL_SESSION=true KDE_SESSION_UID=1000 KDE_SESSION_VERSION=6 LANG=en_US.UTF-8 LC_ADDRESS=nl_NL.UTF-8 LC_IDENTIFICATION=nl_NL.UTF-8 LC_MEASUREMENT=nl_NL.UTF-8 LC_MONETARY=nl_NL.UTF-8 LC_NAME=nl_NL.UTF-8 LC_NUMERIC=nl_NL.UTF-8 LC_PAPER=nl_NL.UTF-8 LC_TELEPHONE=nl_NL.UTF-8 LC_TIME=nl_NL.UTF-8 LOGNAME=abcde MAIL=/var/spool/mail/abcde MANAGERPID=1337 MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service/session.slice/plasma-plasmashell.service/memory.pressure MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA= MOTD_SHOWN=pam OLDPWD=/home/abcde/dotfiles PAM_KWALLET5_LOGIN=/run/user/1000/kwallet5.socket PATH=/home/abcde/.nvm/versions/node/v18.19.0/bin:/home/abcde/.local/share/zinit/polaris/bin:/home/abcde/.bin:/home/abcde/.cargo/bin:/home/abcde/.local/bin:/home/abcde/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/home/abcde/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/bin PWD=/home/abcde/dotfiles QT_AUTO_SCREEN_SCALE_FACTOR=0 QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 QT_WAYLAND_RECONNECT=1 SESSION_MANAGER=local/Doom:@/tmp/.ICE-unix/1459,unix/Doom:/tmp/.ICE-unix/1459 SHELL=/usr/bin/zsh SYSTEMD_EXEC_PID=1486 TERM=xterm-256color TERM_PROGRAM=WezTerm TERM_PROGRAM_VERSION=20240203-110809-5046fc22 USER=abcde WEZTERM_CONFIG_DIR=/home/abcde/.config/wezterm WEZTERM_CONFIG_FILE=/home/abcde/.config/wezterm/wezterm.lua WEZTERM_EXECUTABLE=/usr/bin/wezterm-gui WEZTERM_EXECUTABLE_DIR=/usr/bin WEZTERM_PANE=5 WEZTERM_UNIX_SOCKET=/run/user/1000/wezterm/gui-sock-1245856 XAUTHORITY=/tmp/xauth_KvpLvx XDG_CONFIG_DIRS=/home/abcde/.config/kdedefaults:/etc/xdg:/usr/share/manjaro-kde-settings/xdg:/usr/share/manjaro-kde-settings/xdg XDG_CURRENT_DESKTOP=KDE XDG_DATA_DIRS=/home/abcde/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share XDG_MENU_PREFIX=plasma- XDG_RUNTIME_DIR=/run/user/1000 XDG_SEAT=seat0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 XDG_SESSION_CLASS=user XDG_SESSION_DESKTOP=KDE XDG_SESSION_ID=2 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session1 XDG_SESSION_TYPE=x11 XDG_VTNR=2 SHLVL=1 POSH_THEME=/home/abcde/.config/ohmyposh/default.toml POSH_SHELL_VERSION=5.9 POSH_PID=1253160 POWERLINE_COMMAND=oh-my-posh CONDA_PROMPT_MODIFIER=false POSH_PROMPT_COUNT=2 ZLE_RPROMPT_INDENT=0 ZPFX=/home/abcde/.local/share/zinit/polaris ZSH_CACHE_DIR=/home/abcde/.cache/zinit PMSPEC=0uUpiPsf NVM_DIR=/home/abcde/.nvm NVM_CD_FLAGS=-q NVM_BIN=/home/abcde/.nvm/versions/node/v18.19.0/bin NVM_INC=/home/abcde/.nvm/versions/node/v18.19.0/include/node LC_ALL=en_US.UTF-8 EDITOR=nvim VISUAL=nvim BROWSER=firefox GPG_TTY=/dev/pts/2 FZF_CTRL_T_OPTS=
      --preview 'bat -n --color=always {}'
      --bind 'ctrl-/:change-preview-window(down|hidden|)' FZF_DEFAULT_COMMAND=fd --type f --strip-cwd-prefix --hidden --follow --exclude .git OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES POSH_CURSOR_LINE=44 POSH_CURSOR_COLUMN=1 _=/usr/bin/oh-my-posh]
[TRACE] 09:42:46.266 shell.go:Pwd() - 50ns
[DEBUG] 09:42:46.266 shell_unix.go:IsWsl:35 → false
[TRACE] 09:42:46.266 shell_unix.go:IsWsl() - 3.15µs
[TRACE] 09:42:46.266 shell.go:GOOS() - 50ns
[TRACE] 09:42:46.266 shell.go:GOOS() - 30ns
[TRACE] 09:42:46.266 shell.go:GOOS() - 30ns
[TRACE] 09:42:46.266 shell.go:GOOS() - 30ns
[TRACE] 09:42:46.266 shell.go:GOOS() - 40ns
[TRACE] 09:42:46.266 shell.go:GOOS() - 30ns
[TRACE] 09:42:46.266 shell.go:GOOS() - 30ns
[TRACE] 09:42:46.266 shell.go:GOOS() - 30ns
[TRACE] 09:42:46.266 shell.go:GOOS() - 40ns
[TRACE] 09:42:46.266 shell.go:GOOS() - 30ns
[DEBUG] 09:42:46.266 shell.go:User:494 → abcde
[TRACE] 09:42:46.266 shell.go:User() - 2.97µs
[DEBUG] 09:42:46.266 shell.go:Host:511 → Doom
[TRACE] 09:42:46.266 shell.go:Host() - 4.43µs
[TRACE] 09:42:46.266 shell.go:GOOS() - 30ns
[DEBUG] 09:42:46.266 shell_unix.go:Platform:87 → manjaro
[DEBUG] 09:42:46.266 shell.go:Getenv:326 → 1
[TRACE] 09:42:46.266 shell.go:Getenv(SHLVL) - 2.94µs
[TRACE] 09:42:46.266 shell.go:TemplateCache() - 149.003µs
[TRACE] 09:42:46.266 shell.go:StackCount() - 70ns
[TRACE] 09:42:46.266 shell_unix.go:DirIsWritable(/home/abcde/dotfiles) - 4.29µs
[TRACE] 09:42:46.266 shell.go:TemplateCache() - 100ns
[DEBUG] 09:42:46.270 shell.go:HasFilesInDir:409 → false
[TRACE] 09:42:46.270 shell.go:HasFilesInDir(pyvenv.cfg) - 4.899154ms
[DEBUG] 09:42:46.270 shell.go:HasFilesInDir:409 → false
[TRACE] 09:42:46.270 shell.go:HasFilesInDir(pyvenv.cfg) - 33.4µs
[DEBUG] 09:42:46.270 properties.go:GetBool:22 → folder_name_fallback: true
[DEBUG] 09:42:46.270 shell.go:Getenv:326 → NO DATA
[TRACE] 09:42:46.270 shell.go:Getenv(VIRTUAL_ENV) - 2.81µs
[DEBUG] 09:42:46.270 shell.go:Getenv:326 → NO DATA
[TRACE] 09:42:46.270 shell.go:Getenv(CONDA_ENV_PATH) - 2.381µs
[DEBUG] 09:42:46.270 shell.go:Getenv:326 → NO DATA
[TRACE] 09:42:46.270 shell.go:Getenv(CONDA_DEFAULT_ENV) - 2.21µs
[DEBUG] 09:42:46.276 shell.go:RunCommand:531 ↓
    # branch.oid 89168cee12d2b7f093c95aa2ea9ef72bfa0d3bf4
    # branch.head master
    # branch.upstream origin/master
    # branch.ab +0 -0
    1 .M N... 100644 100644 100644 f2859e4bd8952d80ea0d9c880fd4be38f0ccbcc3 f2859e4bd8952d80ea0d9c880fd4be38f0ccbcc3 .config/nvim/lazy-lock.json
    1 .M N... 100644 100644 100644 cd0fc972b78daf257686d47b25287f6e3364f4aa cd0fc972b78daf257686d47b25287f6e3364f4aa .config/ohmyposh/default.toml
    1 .M N... 100644 100644 100644 c2780ed5bf6f534de0c645130dc249f4b2e18ee9 c2780ed5bf6f534de0c645130dc249f4b2e18ee9 .zshrc
[TRACE] 09:42:46.276 shell.go:RunCommand(git -C /home/abcde/dotfiles --no-optional-locks -c core.quotepath=false -c color.status=false status -unormal --branch --porcelain=2) - 10.568408ms
[DEBUG] 09:42:46.276 properties.go:GetString:28 →  
[DEBUG] 09:42:46.276 properties.go:GetInt:40 → branch_max_length: 0
[DEBUG] 09:42:46.276 shell.go:HasFolder:438 → false
[TRACE] 09:42:46.276 shell.go:HasFolder(/home/abcde/dotfiles/.git/rebase-merge) - 9.37µs
[DEBUG] 09:42:46.276 shell.go:HasFolder:438 → false
[TRACE] 09:42:46.276 shell.go:HasFolder(/home/abcde/dotfiles/.git/rebase-apply) - 4.88µs
[DEBUG] 09:42:46.276 properties.go:GetString:28 →  
[DEBUG] 09:42:46.276 shell.go:HasFilesInDir:409 → false
[TRACE] 09:42:46.276 shell.go:HasFilesInDir(MERGE_MSG) - 54.89µs
[DEBUG] 09:42:46.276 shell.go:HasFilesInDir:409 → false
[TRACE] 09:42:46.276 shell.go:HasFilesInDir(CHERRY_PICK_HEAD) - 5.43µs
[DEBUG] 09:42:46.276 shell.go:HasFilesInDir:409 → false
[TRACE] 09:42:46.276 shell.go:HasFilesInDir(REVERT_HEAD) - 4.84µs
[DEBUG] 09:42:46.276 shell.go:HasFilesInDir:409 → false
[TRACE] 09:42:46.276 shell.go:HasFilesInDir(sequencer/todo) - 4.21µs
[DEBUG] 09:42:46.276 properties.go:GetString:28 → ≡
[DEBUG] 09:42:46.276 properties.go:GetBool:22 → fetch_upstream_icon: true
[DEBUG] 09:42:46.276 properties.go:GetKeyValueMap:46 → upstream_icons: map[]
[DEBUG] 09:42:46.276 properties.go:GetString:28 →  
[TRACE] 09:42:46.276 shell.go:TemplateCache() - 320ns
[DEBUG] 09:42:46.277 text.go:Render:72 → Rendering template: {{ .Path }} 
[DEBUG] 09:42:46.277 text.go:Render:72 → Rendering template: {{ .UpstreamIcon }}{{ .HEAD }}{{ if or (.Working.Changed) (.Staging.Changed) }}* {{ .Working.String }}{{ end }} <cyan>{{ if gt .Behind 0 }}⇣{{ end }}{{ if gt .Ahead 0 }}⇡{{ end }}</><blue>{{ if gt .StashCount 0 }} *{{ .StashCount }}{{ end }}</>
[TRACE] 09:42:46.278 shell.go:TemplateCache() - 284.714µs
[TRACE] 09:42:46.278 shell.go:TemplateCache() - 140ns
[ERROR] 09:42:46.278 shell.go:FileContent:464 → open /home/abcde/dotfiles/.git/logs/refs/stash: no such file or directory
[TRACE] 09:42:46.278 shell.go:FileContent(/home/abcde/dotfiles/.git/logs/refs/stash) - 18.871µs
[DEBUG] 09:42:46.278 shell.go:Getenv:326 → WezTerm
[TRACE] 09:42:46.278 shell.go:Getenv(TERM_PROGRAM) - 4.72µs
[TRACE] 09:42:46.278 shell.go:Shell() - 120ns
[DEBUG] 09:42:46.278 text.go:Render:72 → Rendering template: plain
[DEBUG] 09:42:46.278 text.go:Render:72 → Rendering template: plain
[DEBUG] 09:42:46.278 text.go:Render:72 → Rendering template: plain
[DEBUG] 09:42:46.278 text.go:Render:72 → Rendering template: plain
[DEBUG] 09:42:46.278 text.go:Render:72 → Rendering template: plain
[DEBUG] 09:42:46.278 text.go:Render:72 → Rendering template: plain
[TRACE] 09:42:46.278 shell.go:Shell() - 80ns
[TRACE] 09:42:46.278 shell.go:Shell() - 30ns
[TRACE] 09:42:46.278 shell.go:Shell() - 30ns
[TRACE] 09:42:46.278 shell.go:Shell() - 30ns
[TRACE] 09:42:46.278 shell.go:Flags() - 140ns
[TRACE] 09:42:46.278 shell.go:Pwd() - 120ns
[TRACE] 09:42:46.278 shell.go:GOOS() - 60ns
[DEBUG] 09:42:46.278 segment.go:SetEnabled:560 → Segment: Executiontime
[DEBUG] 09:42:46.278 properties.go:GetBool:22 → always_enabled: false
[TRACE] 09:42:46.278 shell.go:ExecutionTime() - 60ns
[DEBUG] 09:42:46.278 properties.go:GetFloat64:34 → threshold: 500.000000
[TRACE] 09:42:46.278 shell.go:Flags() - 150ns
[TRACE] 09:42:46.278 shell.go:Pwd() - 130ns
[TRACE] 09:42:46.278 shell.go:GOOS() - 40ns
[DEBUG] 09:42:46.278 segment.go:SetEnabled:560 → Segment: Session
[DEBUG] 09:42:46.278 shell.go:Getenv:326 → NO DATA
[TRACE] 09:42:46.278 shell.go:Getenv(SSH_CONNECTION) - 3.65µs
[DEBUG] 09:42:46.278 shell.go:Getenv:326 → NO DATA
[TRACE] 09:42:46.278 shell.go:Getenv(SSH_CLIENT) - 2.51µs
[DEBUG] 09:42:46.278 shell_unix.go:Platform:87 → manjaro
[DEBUG] 09:42:46.279 shell.go:RunCommand:531 → NO DATA
[TRACE] 09:42:46.279 shell.go:RunCommand(who am i) - 1.009915ms
[TRACE] 09:42:46.279 shell.go:TemplateCache() - 300ns
[DEBUG] 09:42:46.279 text.go:Render:72 → Rendering template: {{ if .SSHSession }}  {{ end }}
[TRACE] 09:42:46.279 shell.go:TemplateCache() - 130ns
[TRACE] 09:42:46.279 shell.go:TemplateCache() - 50ns
[TRACE] 09:42:46.279 shell.go:Shell() - 220ns
[TRACE] 09:42:46.279 shell.go:Shell() - 40ns
[TRACE] 09:42:46.279 shell.go:Shell() - 40ns
[TRACE] 09:42:46.279 shell.go:Shell() - 50ns
[TRACE] 09:42:46.279 shell.go:Flags() - 60ns
[TRACE] 09:42:46.279 shell.go:Pwd() - 120ns
[TRACE] 09:42:46.279 shell.go:GOOS() - 60ns
[DEBUG] 09:42:46.279 segment.go:SetEnabled:560 → Segment: Text
[TRACE] 09:42:46.279 shell.go:TemplateCache() - 120ns
[DEBUG] 09:42:46.279 text.go:Render:72 → Rendering template: ❯
[DEBUG] 09:42:46.279 shell.go:Getenv:326 → WezTerm
[TRACE] 09:42:46.279 shell.go:Getenv(TERM_PROGRAM) - 3.99µs
[TRACE] 09:42:46.279 shell.go:Shell() - 60ns
[DEBUG] 09:42:46.279 text.go:Render:72 → Rendering template: {{if gt .Code 0}}p:red{{end}}
[TRACE] 09:42:46.280 shell.go:TemplateCache() - 180ns
[DEBUG] 09:42:46.280 text.go:Render:72 → Rendering template: plain
[TRACE] 09:42:46.280 shell.go:Shell() - 160ns
[TRACE] 09:42:46.280 shell.go:Shell() - 40ns
[TRACE] 09:42:46.280 shell.go:Shell() - 50ns
[TRACE] 09:42:46.280 shell.go:Shell() - 50ns
[TRACE] 09:42:46.280 shell.go:Flags() - 50ns
[DEBUG] 09:42:46.280 shell.go:Getenv:326 → NO DATA
[TRACE] 09:42:46.280 shell.go:Getenv(OMP_CACHE_DIR) - 7.66µs
[DEBUG] 09:42:46.280 shell.go:Getenv:326 → NO DATA
[TRACE] 09:42:46.280 shell.go:Getenv(XDG_CACHE_HOME) - 2.38µs
[TRACE] 09:42:46.280 shell_unix.go:CachePath() - 27.18µs
[TRACE] 09:42:46.280 shell.go:Flags() - 30ns
JanDeDobbeleer commented 1 month ago

@wouter-intveld does it also occur when you remove the secondary prompt from the configuration and restart the shell?

BTW, I can't reproduce this at all using up-to-date tools:

image

wouter-intveld commented 1 month ago

@JanDeDobbeleer Thanks for your reply. Tried your suggestion, but had the same error occur. I realized I did not list the full error, forgot to paste the last few characters that were present on the new line. Here's the full output:

❯ cd py-test-dev
❯ pipenv shell
Launching subshell in virtual environment...
 . /home/abcde/.local/share/virtualenvs/abcde-tR1vbTAD/bin/activate
❯ 1vbTAD/bin/activate
zsh: no such file or directory: 1vbTAD/bin/activate

~
❯ ;1R

I just run the command on my MacBook and there was no issue there, using the same config.

linux: pipenv, version 2024.0.1 zsh 5.9 (x86_64-pc-linux-gnu) wezterm 20240203-110809-5046fc22

macbook: pipenv, version 2024.0.1 zsh 5.9 (x86_64-apple-darwin23.0) wezterm 20240203-110809-5046fc22

JanDeDobbeleer commented 1 month ago

@wouter-intveld next check. What happens when you add disable_cursor_positioning = true to your profile, restart the shell and try again?

wouter-intveld commented 1 month ago

@JanDeDobbeleer, I've added disable_cursor_positioning = true and that resolves the issue with pipenv shell giving an error. It doesn't stay in the directory where I invoked the command, but instead sends me to my home dir.

JanDeDobbeleer commented 1 month ago

@wouter-intveld that last issue can't be oh-my-posh, as we don't set anything to influence the environment. All we do is print a string and set it to the prompt variable.

The original issue is because we print an escape sequence to fetch the cursor position and that one influences the python command. I do think that's also a bug on their end, as this shouldn't influence how this works.