prompt_pure_system_report
):- Zsh: zsh 5.8.1 (x86_64-apple-darwin21.0) (/bin/zsh)
- Operating system: macOS 12.7.1 (21G920)
- Terminal program: Apple_Terminal (445)
- Tmux: no
- Git: git version 2.37.1 (Apple Git-137.1)
- Pure state:
- username: `''`
- prompt: `❯`
- version: `1.22.0`
- zsh-async version: `1.8.6`
- PROMPT: `typeset -g PROMPT=$'%F{${prompt_pure_colors[path]}}%~%f
%{
%}%(12V.%F{$prompt_pure_colors[virtualenv]}%12v%f .)%(?.%F{$prompt_pure_colors[prompt:success]}.%F{$prompt_pure_colors[prompt:error]})${prompt_pure_state[prompt]}%f '`
- Colors: `typeset -g -A prompt_pure_colors=( [execution_time]=yellow [git:action]=yellow [git:arrow]=cyan [git:branch]=242 [git:branch:cached]=red [git:dirty]=218 [git:stash]=cyan [host]=242 [path]=blue [prompt:continuation]=242 [prompt:error]=red [prompt:success]=magenta [suspended_jobs]=red [user]=242 [user:root]=default [virtualenv]=242 )`
- TERM: `export TERM=xterm-256color`
- Virtualenv: `export VIRTUAL_ENV_DISABLE_PROMPT=12`
- Conda: `export CONDA_CHANGEPS1=no`
- Detected frameworks: None
Using the exec $SHELL -l
command breaks ZSH's session files.
I've stripped my .zshrc
down to only Homebrew and Pure. With Pure enabled the session file contains the text Saving session...
, which causes a command not found: Saving
error. If I comment out Pure this text does not leak into the session file and no errors occur.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install pure
Copy stripped back .zshrc
below into ~/
.
Run login command:
❯ exec $SHELL -l
/Users/ziadoz/.zsh_sessions/F79A28F2-7FA9-40F8-83BA-728DD499E367.session:2: command not found: Saving
❯ cat /Users/ziadoz/.zsh_sessions/F79A28F2-7FA9-40F8-83BA-728DD499E367.session
Saving session...echo Restored session: "$(/bin/date -r 1701213053)"
Notice the text Saving session...
has leaked into the session file.
This text comes from shell_session_save()
in /etc/zshrc_Apple_Terminal
, but it only leaks into the session file when Pure is enabled. When Pure is commented out the session file does not contain this text and is restored without errors.
.zshrc
:eval "$(/usr/local/bin/brew shellenv)"
fpath+=("$(brew --prefix)/share/zsh/site-functions")
autoload -U promptinit; promptinit
prompt pure
zstyle :prompt:pure:git:stash show yes
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too