Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: Restoring terminal session drops user into a zinit plugin directory #148

Open
rainux opened this issue Dec 23, 2021 · 4 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@rainux
Copy link

rainux commented Dec 23, 2021

Issue description

I've been using iTerm2's session restoration feature for a long time, and have a habit of keep 9 tabs open so I can quickly switch between them for different jobs.

After a system reboot, though iTerm2 can't fully restore the session according to the above documentation, but it can always keep each tab in the original directory. But after I use zinit, reboot system may drop me to a plugin directory of zinit, as the screenshot shows.

image

zinit config

### Added by Zinit's installer
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
    print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f"
    command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
    command git clone https://github.com/zdharma/zinit "$HOME/.zinit/bin" && \
        print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
        print -P "%F{160}▓▒░ The clone has failed.%f%b"
fi

source "$HOME/.zinit/bin/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit

# Load a few important annexes, without Turbo
# (this is currently required for annexes)
zinit light-mode for \
    zinit-zsh/z-a-rust \
    zinit-zsh/z-a-as-monitor \
    zinit-zsh/z-a-patch-dl \
    zinit-zsh/z-a-bin-gem-node

zinit wait lucid light-mode for \
  atinit"zicompinit; zicdreplay" \
      zdharma/fast-syntax-highlighting \
  atload"_zsh_autosuggest_start && bindkey '^e' autosuggest-accept" \
      zsh-users/zsh-autosuggestions \
  blockf atpull'zinit creinstall -q .' \
      zsh-users/zsh-completions \
  as"program" pick"$ZPFX/bin/git-*" src"etc/git-extras-completion.zsh" make"PREFIX=$ZPFX" tj/git-extras

### End of Zinit's installer chunk

zinit version or commit ID

9ea1c9b

zsh version

5.8

host info

CPUTYPE=x86_64 MACHTYPE=x86_64 OSTYPE=darwin21.0 LC_CTYPE=UTF-8 Darwin 21.2.0 Darwin Kernel Version 21.2.0

@rainux rainux added 🎲 triage bug Something isn't working labels Dec 23, 2021
@vladdoster
Copy link
Member

This isn't a valid config. Please update it so I can run it.

@vladdoster vladdoster self-assigned this Dec 27, 2021
@vladdoster
Copy link
Member

I have no idea how to attempt to reproduce. Please supply a video of the issue or detailed steps of how to reproduce this.

This most likely stems from Iterm, unless you can provide information proving otherwise.

@alichtman alichtman reopened this Dec 27, 2021
@alichtman
Copy link
Member

alichtman commented Dec 27, 2021

I've experienced this bug too, in gnome Terminal. It's a valid bug report. Haven't attempted to repro with the config above. Happens for me on tmux continuum restore

@rainux
Copy link
Author

rainux commented Dec 29, 2021

Sorry maybe I didn't make it clear, I don't know how to reproduce this bug too, it occurs sometimes, not every time after reboot system.

@alichtman alichtman changed the title 🐞 bug: 🐞 Bug: Restoring session (with iTerm2 and gnome-terminal, or tmux) sometimes drops user into zinit plugin directories Dec 30, 2021
@vladdoster vladdoster changed the title 🐞 Bug: Restoring session (with iTerm2 and gnome-terminal, or tmux) sometimes drops user into zinit plugin directories bug: Restoring terminal session drops user into a zinit plugin directory Apr 5, 2022
@vladdoster vladdoster changed the title bug: Restoring terminal session drops user into a zinit plugin directory [bug]: Restoring terminal session drops user into a zinit plugin directory Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants