Open ziadoz opened 12 months ago
Just a heads up that I'm still seeing this issue in macOS Sonoma 14.4 using the latest version of Pure (installed via Git instead of HomeBrew):
/Users/ziadoz/.zsh_sessions/B7F935A6-873B-479F-AE4D-3FE2C61B4BA2.session:2: command not found: Saving
@ziadoz I'm not able to reproduce, have you checked your .zprofile
, .zshenv
, etc. as well? And that there aren't any changes in your global Zsh files (e.g. under /etc
)?
@mafredri It's tricky to reproduce as it doesn't always happen since I switched to macOS Sonoma.
I've stripped my ~/.zshrc
down to this:
fpath+=($HOME/.zsh/pure)
autoload -U promptinit; promptinit
prompt pure
zstyle :prompt:pure:git:stash show yes
Then I open Terminal, run exec $SHELL -l
, then CMD+Q quit Terminal, then reopen Terminal and repeat. Eventually when I open the shell I see the error:
❯
/Users/ziadoz/.zsh_sessions/B7F935A6-873B-479F-AE4D-3FE2C61B4BA2.session:2: command not found: Saving
~
❯
I'm not able to reproduce, have you checked your .zprofile, .zshenv, etc. as well? And that there aren't any changes in your global Zsh files (e.g. under /etc)?
I'm on a fresh install of macOS Sonoma, so nothing in /etc
should have been changed.
My dotfiles configuration is here if that's any help: https://github.com/ziadoz/dotfiles/tree/master/zsh
I started my laptop up after having had it shut down for a few days, and Terminal started with this message, which I haven't seen before:
Last login: Wed Apr 17 08:12:33 on ttys000
/bin/date: option requires an argument -- r
usage: date [-jnRu] [-I[date|hours|minutes|seconds]] [-f input_fmt]
[-r filename|seconds] [-v[+|-]val[y|m|w|d|H|M|S]]
[[[[mm]dd]HH]MM[[cc]yy][.SS] | new_date] [+output_fmt]
/Users/ziadoz/.zsh_sessions/B6417CEC-CB8A-4FBB-A3D1-3D04BCE380FA.session:2: command not found: Saving
❯ cat /Users/ziadoz/.zsh_sessions/B6417CEC-CB8A-4FBB-A3D1-3D04BCE380FA.session
echo Restored session: "$(/bin/date -r 1713337954)"
General information
System report (output of
prompt_pure_system_report
):Other information
I have:
Problem description
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 textSaving session...
, which causes acommand not found: Saving
error. If I comment out Pure this text does not leak into the session file and no errors occur.Reproduction steps
Install HomeBrew:
Install Pure:
Copy stripped back
.zshrc
below into~/
.Run login command:
/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)"
-->