romkatv / zsh4humans

A turnkey configuration for Zsh
MIT License
1.75k stars 111 forks source link

zsh just exits on terminal start #71

Closed kurktchiev closed 3 years ago

kurktchiev commented 3 years ago

So i just ran z4h update and went to reconnect from my iPad to my home box that runs z4h and now no matter what I do zsh just immediately exits upon startup.

I replaced .zshrc with the latest one from the repo, to make sure I didn’t have any breaking changes missing. Same result. If i flat our delete .zshrc the shell will fire up. Not sure how to debug this weird bug.

If I try to just open a terminal window on the box i am SSHing into, it just exists as well. Here is the setenv output from my iPadOS app just in case:

USER=mobile
LOGNAME=mobile
PATH=/private/var/containers/Bundle/Application/7E261ABD-40BA-43C3-9D67-3337D08E5099/Blink.app/bin:/private/var/containers/Bundle/Application/7E261ABD-40BA-43C3-9D67-3337D08E5099/Blink.app/Library/bin:/private/var/containers/Bundle/Application/7E261ABD-40BA-43C3-9D67-3337D08E5099/Blink.app/Library/bin3:/var/mobile/Containers/Data/Application/B02F041A-DCF9-49F3-B811-471CF32836E2/Library/bin:/var/mobile/Containers/Data/Application/B02F041A-DCF9-49F3-B811-471CF32836E2/Documents/bin:/usr/bin:/bin:/usr/sbin:/sbin
CFFIXED_USER_HOME=/private/var/mobile/Containers/Data/Application/B02F041A-DCF9-49F3-B811-471CF32836E2
HOME=/private/var/mobile/Containers/Data/Application/B02F041A-DCF9-49F3-B811-471CF32836E2
SHELL=/bin/sh
__CF_USER_TEXT_ENCODING=0x1F5:0:0
TMPDIR=/private/var/mobile/Containers/Data/Application/B02F041A-DCF9-49F3-B811-471CF32836E2/tmp/
XPC_SERVICE_NAME=UIKitApplication:Com.CarlosCabanero.BlinkShell[49f2][rb-legacy]
XPC_FLAGS=0x0
APPDIR=/private/var/containers/Bundle/Application/7E261ABD-40BA-43C3-9D67-3337D08E5099/Blink.app
PATH_LOCALE=/private/var/containers/Bundle/Application/7E261ABD-40BA-43C3-9D67-3337D08E5099/Blink.app/locales.bundle
TERM=xterm-256color
CLICOLOR=1
LSCOLORS=ExFxBxDxCxegedabagacad
SSH_HOME=/var/mobile/Containers/Data/Application/B02F041A-DCF9-49F3-B811-471CF32836E2/Documents
DIG_HOME=/var/mobile/Containers/Data/Application/B02F041A-DCF9-49F3-B811-471CF32836E2/Documents
CURL_HOME=/var/mobile/Containers/Data/Application/B02F041A-DCF9-49F3-B811-471CF32836E2/Documents
SSL_CERT_FILE=/private/var/containers/Bundle/Application/7E261ABD-40BA-43C3-9D67-3337D08E5099/Blink.app/cacert.pem
PYTHONHOME=/var/mobile/Containers/Data/Application/B02F041A-DCF9-49F3-B811-471CF32836E2/Library
XDG_CACHE_HOME=/var/mobile/Containers/Data/Application/B02F041A-DCF9-49F3-B811-471CF32836E2/Library/Caches
XDG_CONFIG_HOME=/var/mobile/Containers/Data/Application/B02F041A-DCF9-49F3-B811-471CF32836E2/Library/Preferences
XDG_DATA_HOME=/var/mobile/Containers/Data/Application/B02F041A-DCF9-49F3-B811-471CF32836E2/Library
PYTHONEXECUTABLE=python3
PYZMQ_BACKEND=cffi
JUPYTER_CONFIG_DIR=/var/mobile/Containers/Data/Application/B02F041A-DCF9-49F3-B811-471CF32836E2/Documents/.jupyter
IPYTHONDIR=/var/mobile/Containers/Data/Application/B02F041A-DCF9-49F3-B811-471CF32836E2/Documents/.ipython
MPLCONFIGDIR=/var/mobile/Containers/Data/Application/B02F041A-DCF9-49F3-B811-471CF32836E2/Documents/.config/matplotlib
HGRCPATH=/var/mobile/Containers/Data/Application/B02F041A-DCF9-49F3-B811-471CF32836E2/Documents/.hgrc
LC_CTYPE=UTF-8
COLUMNS=150
LINES=56
romkatv commented 3 years ago

Please debug this further. If you cannot, revert to v4.

kurktchiev commented 3 years ago

Have any suggestions? I am not 100% on how to try firing up zsh with a debug flag or dump or something? Everything i keep trying just ends up in an immediate exit so far outside of what I posted.

romkatv commented 3 years ago

zsh -x is a good starting point.

romkatv commented 3 years ago

Even better: add set -x at the top of ~/.zshenv and run zsh.

kurktchiev commented 3 years ago

yeah... same result, it just immediately exits.

kurktchiev commented 3 years ago

aha... ok somewhat progress. So i run a tmux session on that box. As soon as I killed it, zsh came back just fine

romkatv commented 3 years ago

If you've added set -x at the top of ~/.zshenv and zsh exits with no output, it can only mean two things:

  1. zsh binary is hosed. You can verify by running zsh -f. If it exits with no output, the binary is broken.
  2. Global zsh configs are broken that cause zsh to exit before it even reaches ~/.zshenv. You can verify this by running ZDOTDIR=/non-existent zsh. If it exits with no output, global zsh configs are broken.

My guess is that neither (1) nor (2) will confirm the problem and the explanation is that you've made an error in the original experiment.

kurktchiev commented 3 years ago

so ran some tests. First:

  1. zsh -f output: bash-3.2$ zsh -f zeus%
  2. if i run: zsh -x | less i actually end up getting dumped in zsh and get the following outputs:
    ╭─ 08:48:40  solutions1@mongo-duke  ~ ──────────────────────────────────────────────────────────────────────── valhalla@zeus  192.168.1.5  ✔ 
    ╰─▪ 
  3. Removing all the .zsh* files and letting a fresh install download and setup everything. I end up getting dumped into exit again. and zsh -x outputs:
    bash-3.2$ zsh -x       
    +/Users/valhalla/.zshenv:9> [ -n 5.7.1 ']'
    +/Users/valhalla/.zshenv:10> : /Users/valhalla
    +/Users/valhalla/.zshenv:11> setopt no_global_rcs
    +/Users/valhalla/.zshenv:12> [[ -o no_interactive ]]
    +/Users/valhalla/.zshenv:15> setopt no_rcs
    +/Users/valhalla/.zshenv:16> unset Z4H_BOOTSTRAPPING
    +/Users/valhalla/.zshenv:26> Z4H_URL=https://raw.githubusercontent.com/romkatv/zsh4humans/v5 
    +/Users/valhalla/.zshenv:27> : /Users/valhalla/.cache/zsh4humans/v5
    +/Users/valhalla/.zshenv:29> umask o-w
    +/Users/valhalla/.zshenv:31> [ '!' -e /Users/valhalla/.cache/zsh4humans/v5/z4h.zsh ']'
    +/Users/valhalla/.zshenv:45> . /Users/valhalla/.cache/zsh4humans/v5/z4h.zsh
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:1> export 'TERM=xterm-256color'
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:3> [ -n 5.7.1 ']'
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:4> [ -n '' ']'
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:13> typeset -gri '_z4h_source_called=1'
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:15> emulate zsh
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:16> setopt always_to_end auto_cd auto_param_slash auto_pushd c_bases auto_menu extended_glob extended_history hist_expire_dups_first hist_find_no_dups hist_ignore_dups hist_ignore_space hist_verify interactive_comments multios no_aliases no_bg_nice no_bg_nice no_flow_control no_prompt_bang no_prompt_subst prompt_cr prompt_percent prompt_sp share_history typeset_silent hist_save_no_dups no_auto_remove_slash no_list_types no_beep
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:28> PS1=$'%B%F{2}%n@%m%f %F{4}%~%f\n%F{%(?.2.1)}%#%f%b ' 
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:30> RPS1='%B%F{3}z4h recovery mode%f%b' 
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:32> WORDCHARS='' 
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:33> ZLE_REMOVE_SUFFIX_CHARS='' 
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:34> HISTSIZE=1000000000 
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:35> SAVEHIST=1000000000 
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:37> [ -n '' ']'
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:40> typeset -gri '_z4h_custom_histfile=0'
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:41> HISTFILE=/Users/valhalla/.zsh_history 
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:44> [ -n '' ']'
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:49> [ '!' -e /tmp -a -e /var/folders/7j/h3k4p99x4n9bdh0lk5f2d33h0000gn/T/ ']'
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:53> [ '' '!=' /Users/valhalla/.terminfo ']'
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:53> [ -e /Users/valhalla/.terminfo/x/xterm-256color ']'
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:54> export 'TERMINFO=/Users/valhalla/.terminfo'
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:57> bindkey -d
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:58> bindkey -e
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:60> bindkey -s '^[OM' '^M'
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:61> bindkey -s '^[Ok' +
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:62> bindkey -s '^[Om' -
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:63> bindkey -s '^[Oj' '*'
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:64> bindkey -s '^[Oo' /
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:65> bindkey -s '^[OX' '='
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:66> bindkey -s '^[OH' '^[[H'
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:67> bindkey -s '^[OF' '^[[F'
    +/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:68> bindkey -s '^[OA' '^[[A'
    [exited]
kurktchiev commented 3 years ago

if i use the pipe trick to get it to “finish starting” the zsh -x output is:

bash-3.2$ zsh -x > test
+/Users/valhalla/.zshenv:9> [ -n 5.7.1 ']'
+/Users/valhalla/.zshenv:10> : /Users/valhalla
+/Users/valhalla/.zshenv:11> setopt no_global_rcs
+/Users/valhalla/.zshenv:12> [[ -o no_interactive ]]
+/Users/valhalla/.zshenv:15> setopt no_rcs
+/Users/valhalla/.zshenv:16> unset Z4H_BOOTSTRAPPING
+/Users/valhalla/.zshenv:26> Z4H_URL=https://raw.githubusercontent.com/romkatv/zsh4humans/v5 
+/Users/valhalla/.zshenv:27> : /Users/valhalla/.cache/zsh4humans/v5
+/Users/valhalla/.zshenv:29> umask o-w
+/Users/valhalla/.zshenv:31> [ '!' -e /Users/valhalla/.cache/zsh4humans/v5/z4h.zsh ']'
+/Users/valhalla/.zshenv:45> . /Users/valhalla/.cache/zsh4humans/v5/z4h.zsh
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:1> export 'TERM=xterm-256color'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:3> [ -n 5.7.1 ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:4> [ -n '' ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:13> typeset -gri '_z4h_source_called=1'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:15> emulate zsh
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:16> setopt always_to_end auto_cd auto_param_slash auto_pushd c_bases auto_menu extended_glob extended_history hist_expire_dups_first hist_find_no_dups hist_ignore_dups hist_ignore_space hist_verify interactive_comments multios no_aliases no_bg_nice no_bg_nice no_flow_control no_prompt_bang no_prompt_subst prompt_cr prompt_percent prompt_sp share_history typeset_silent hist_save_no_dups no_auto_remove_slash no_list_types no_beep
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:28> PS1=$'%B%F{2}%n@%m%f %F{4}%~%f\n%F{%(?.2.1)}%#%f%b ' 
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:30> RPS1='%B%F{3}z4h recovery mode%f%b' 
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:32> WORDCHARS='' 
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:33> ZLE_REMOVE_SUFFIX_CHARS='' 
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:34> HISTSIZE=1000000000 
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:35> SAVEHIST=1000000000 
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:37> [ -n '' ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:40> typeset -gri '_z4h_custom_histfile=0'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:41> HISTFILE=/Users/valhalla/.zsh_history 
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:44> [ -n '' ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:49> [ '!' -e /tmp -a -e /var/folders/7j/h3k4p99x4n9bdh0lk5f2d33h0000gn/T/ ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:53> [ '' '!=' /Users/valhalla/.terminfo ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:53> [ -e /Users/valhalla/.terminfo/x/xterm-256color ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:54> export 'TERMINFO=/Users/valhalla/.terminfo'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:57> bindkey -d
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:58> bindkey -e
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:60> bindkey -s '^[OM' '^M'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:61> bindkey -s '^[Ok' +
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:62> bindkey -s '^[Om' -
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:63> bindkey -s '^[Oj' '*'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:64> bindkey -s '^[Oo' /
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:65> bindkey -s '^[OX' '='
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:66> bindkey -s '^[OH' '^[[H'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:67> bindkey -s '^[OF' '^[[F'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:68> bindkey -s '^[OA' '^[[A'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:69> bindkey -s '^[OB' '^[[B'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:70> bindkey -s '^[OD' '^[[D'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:71> bindkey -s '^[OC' '^[[C'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:72> bindkey -s '^[[1~' '^[[H'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:73> bindkey -s '^[[4~' '^[[F'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:74> bindkey -s '^[Od' '^[[1;5D'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:75> bindkey -s '^[Oc' '^[[1;5C'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:76> bindkey -s '^[^[[D' '^[[1;3D'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:77> bindkey -s '^[^[[C' '^[[1;3C '
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:78> bindkey -s '^[[7~' '^[[H'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:79> bindkey -s '^[[8~' '^[[F'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:80> bindkey -s '^[[3\^' '^[[3;5~'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:81> bindkey -s '^[^[[3~' '^[[3;3~'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:82> bindkey -s '^[[1;9D' '^[[1;3D'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:83> bindkey -s '^[[1;9C' '^[[1;3C'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:85> bindkey '^[[H' beginning-of-line
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:86> bindkey '^[[F' end-of-line
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:87> bindkey '^[[3~' delete-char
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:88> bindkey '^[[3;5~' kill-word
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:89> bindkey '^[[3;3~' kill-word
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:90> bindkey '^[k' backward-kill-line
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:91> bindkey '^[K' backward-kill-line
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:92> bindkey '^[j' kill-buffer
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:93> bindkey '^[J' kill-buffer
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:94> bindkey '^[/' redo
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:95> bindkey '^[[1;3D' backward-word
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:96> bindkey '^[[1;5D' backward-word
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:97> bindkey '^[[1;3C' forward-word
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:98> bindkey '^[[1;5C' forward-word
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:100> set -A _z4h_script_argv
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:103> [ -n /Users/valhalla/.cache/zsh4humans/v5 ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:104> [ https://raw.githubusercontent.com/romkatv/zsh4humans/v5 '=' https://raw.githubusercontent.com/romkatv/zsh4humans/v5 ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:105> [ -z '' -a -r /Users/valhalla/.cache/zsh4humans/v5/zsh4humans/main.zsh ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:106> . /Users/valhalla/.cache/zsh4humans/v5/zsh4humans/main.zsh
+/Users/valhalla/.cache/zsh4humans/v5/zsh4humans/main.zsh:1> [ -z 5.7.1 ']'
+/Users/valhalla/.cache/zsh4humans/v5/zsh4humans/main.zsh:1> eval '[[ "$ZSH_VERSION" == (5.<8->*|<6->.*) ]]'
+(eval):1> [[ 5.7.1 == (5.<8->*|<6->.*) ]]
+/Users/valhalla/.cache/zsh4humans/v5/zsh4humans/main.zsh:2> . /Users/valhalla/.cache/zsh4humans/v5/zsh4humans/sc/exec-zsh-i
+/Users/valhalla/.cache/zsh4humans/v5/zsh4humans/sc/exec-zsh-i:101> [ -n 5.7.1 ']'
+/Users/valhalla/.cache/zsh4humans/v5/zsh4humans/sc/exec-zsh-i:104> [ 0 '=' 1 ']'
+/Users/valhalla/.cache/zsh4humans/v5/zsh4humans/sc/exec-zsh-i:106> [ 0 '=' 1 ']'
+/Users/valhalla/.cache/zsh4humans/v5/zsh4humans/sc/exec-zsh-i:110> _z4h_exec_zsh_i -i
+_z4h_exec_zsh_i:1> _z4h_try_exec_zsh_i zsh -i
+_z4h_try_exec_zsh_i:1> command -v zsh
+_z4h_try_exec_zsh_i:2> zsh -fc $'\n    [[ $ZSH_VERSION == (5.<8->*|<6->.*) ]] || return\n    exe=${${(M)0:#/*}:-$commands[$0]}\n    zmodload zsh/terminfo zsh/zselect && (( $#terminfo )) ||\n      [[ $ZSH_PATCHLEVEL == zsh-5.8-0-g77d203f && $exe == */bin/zsh &&\n         -e ${exe:h:h}/share/zsh/5.8/scripts/relocate ]]'
+_z4h_try_exec_zsh_i:7> return 0
+_z4h_exec_zsh_i:2> _z4h_try_exec_zsh_i /usr/local/bin/zsh -i
+_z4h_try_exec_zsh_i:1> command -v /usr/local/bin/zsh
+_z4h_try_exec_zsh_i:2> /usr/local/bin/zsh -fc $'\n    [[ $ZSH_VERSION == (5.<8->*|<6->.*) ]] || return\n    exe=${${(M)0:#/*}:-$commands[$0]}\n    zmodload zsh/terminfo zsh/zselect && (( $#terminfo )) ||\n      [[ $ZSH_PATCHLEVEL == zsh-5.8-0-g77d203f && $exe == */bin/zsh &&\n         -e ${exe:h:h}/share/zsh/5.8/scripts/relocate ]]'
+_z4h_try_exec_zsh_i:9> /usr/local/bin/zsh -i
romkatv commented 3 years ago

This isn't a very useful experiment. What you need to do is add set -x at the top of ~/.zshenv and then execute zsh 2>/tmp/trace and look at /tmp/trace.

kurktchiev commented 3 years ago

sure, here you go. as soon as I redirect i end up in the prompt as shown here:

bash-3.2$ zsh 2>zsh-trace
╭─ 08:59:53  solutions1@mongo-duke  ~ ──────────────────────────────────────────────────────────────────────── valhalla@zeus  192.168.1.5  ✔ 
╰─▪ 

and the output of zsh-trace:

+/Users/valhalla/.zshenv:9> [ -n 5.7.1 ']'
+/Users/valhalla/.zshenv:10> : /Users/valhalla
+/Users/valhalla/.zshenv:11> setopt no_global_rcs
+/Users/valhalla/.zshenv:12> [[ -o no_interactive ]]
+/Users/valhalla/.zshenv:15> setopt no_rcs
+/Users/valhalla/.zshenv:16> unset Z4H_BOOTSTRAPPING
+/Users/valhalla/.zshenv:26> Z4H_URL=https://raw.githubusercontent.com/romkatv/zsh4humans/v5 
+/Users/valhalla/.zshenv:27> : /Users/valhalla/.cache/zsh4humans/v5
+/Users/valhalla/.zshenv:29> umask o-w
+/Users/valhalla/.zshenv:31> [ '!' -e /Users/valhalla/.cache/zsh4humans/v5/z4h.zsh ']'
+/Users/valhalla/.zshenv:45> . /Users/valhalla/.cache/zsh4humans/v5/z4h.zsh
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:1> export 'TERM=xterm-256color'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:3> [ -n 5.7.1 ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:4> [ -n '' ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:13> typeset -gri '_z4h_source_called=1'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:15> emulate zsh
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:16> setopt always_to_end auto_cd auto_param_slash auto_pushd c_bases auto_menu extended_glob extended_history hist_expire_dups_first hist_find_no_dups hist_ignore_dups hist_ignore_space hist_verify interactive_comments multios no_aliases no_bg_nice no_bg_nice no_flow_control no_prompt_bang no_prompt_subst prompt_cr prompt_percent prompt_sp share_history typeset_silent hist_save_no_dups no_auto_remove_slash no_list_types no_beep
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:28> PS1=$'%B%F{2}%n@%m%f %F{4}%~%f\n%F{%(?.2.1)}%#%f%b ' 
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:30> RPS1='%B%F{3}z4h recovery mode%f%b' 
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:32> WORDCHARS='' 
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:33> ZLE_REMOVE_SUFFIX_CHARS='' 
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:34> HISTSIZE=1000000000 
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:35> SAVEHIST=1000000000 
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:37> [ -n '' ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:40> typeset -gri '_z4h_custom_histfile=0'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:41> HISTFILE=/Users/valhalla/.zsh_history 
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:44> [ -n '' ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:49> [ '!' -e /tmp -a -e /var/folders/7j/h3k4p99x4n9bdh0lk5f2d33h0000gn/T/ ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:53> [ '' '!=' /Users/valhalla/.terminfo ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:53> [ -e /Users/valhalla/.terminfo/x/xterm-256color ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:54> export 'TERMINFO=/Users/valhalla/.terminfo'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:57> bindkey -d
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:58> bindkey -e
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:60> bindkey -s '^[OM' '^M'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:61> bindkey -s '^[Ok' +
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:62> bindkey -s '^[Om' -
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:63> bindkey -s '^[Oj' '*'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:64> bindkey -s '^[Oo' /
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:65> bindkey -s '^[OX' '='
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:66> bindkey -s '^[OH' '^[[H'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:67> bindkey -s '^[OF' '^[[F'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:68> bindkey -s '^[OA' '^[[A'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:69> bindkey -s '^[OB' '^[[B'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:70> bindkey -s '^[OD' '^[[D'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:71> bindkey -s '^[OC' '^[[C'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:72> bindkey -s '^[[1~' '^[[H'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:73> bindkey -s '^[[4~' '^[[F'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:74> bindkey -s '^[Od' '^[[1;5D'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:75> bindkey -s '^[Oc' '^[[1;5C'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:76> bindkey -s '^[^[[D' '^[[1;3D'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:77> bindkey -s '^[^[[C' '^[[1;3C'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:78> bindkey -s '^[[7~' '^[[H'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:79> bindkey -s '^[[8~' '^[[F'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:80> bindkey -s '^[[3\^' '^[[3;5~'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:81> bindkey -s '^[^[[3~' '^[[3;3~'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:82> bindkey -s '^[[1;9D' '^[[1;3D'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:83> bindkey -s '^[[1;9C' '^[[1;3C'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:85> bindkey '^[[H' beginning-of-line
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:86> bindkey '^[[F' end-of-line
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:87> bindkey '^[[3~' delete-char
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:88> bindkey '^[[3;5~' kill-word
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:89> bindkey '^[[3;3~' kill-word
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:90> bindkey '^[k' backward-kill-line
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:91> bindkey '^[K' backward-kill-line
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:92> bindkey '^[j' kill-buffer
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:93> bindkey '^[J' kill-buffer
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:94> bindkey '^[/' redo
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:95> bindkey '^[[1;3D' backward-word
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:96> bindkey '^[[1;5D' backward-word
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:97> bindkey '^[[1;3C' forward-word
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:98> bindkey '^[[1;5C' forward-word
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:100> set -A _z4h_script_argv
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:103> [ -n /Users/valhalla/.cache/zsh4humans/v5 ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:104> [ https://raw.githubusercontent.com/romkatv/zsh4humans/v5 '=' https://raw.githubusercontent.com/romkatv/zsh4humans/v5 ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:105> [ -z '' -a -r /Users/valhalla/.cache/zsh4humans/v5/zsh4humans/main.zsh ']'
+/Users/valhalla/.cache/zsh4humans/v5/z4h.zsh:106> . /Users/valhalla/.cache/zsh4humans/v5/zsh4humans/main.zsh
+/Users/valhalla/.cache/zsh4humans/v5/zsh4humans/main.zsh:1> [ -z 5.7.1 ']'
+/Users/valhalla/.cache/zsh4humans/v5/zsh4humans/main.zsh:1> eval '[[ "$ZSH_VERSION" == (5.<8->*|<6->.*) ]]'
+(eval):1> [[ 5.7.1 == (5.<8->*|<6->.*) ]]
+/Users/valhalla/.cache/zsh4humans/v5/zsh4humans/main.zsh:2> . /Users/valhalla/.cache/zsh4humans/v5/zsh4humans/sc/exec-zsh-i
+/Users/valhalla/.cache/zsh4humans/v5/zsh4humans/sc/exec-zsh-i:101> [ -n 5.7.1 ']'
+/Users/valhalla/.cache/zsh4humans/v5/zsh4humans/sc/exec-zsh-i:104> [ 0 '=' 1 ']'
+/Users/valhalla/.cache/zsh4humans/v5/zsh4humans/sc/exec-zsh-i:106> [ 0 '=' 1 ']'
+/Users/valhalla/.cache/zsh4humans/v5/zsh4humans/sc/exec-zsh-i:110> _z4h_exec_zsh_i -i
+_z4h_exec_zsh_i:1> _z4h_try_exec_zsh_i zsh -i
+_z4h_try_exec_zsh_i:1> command -v zsh
+_z4h_try_exec_zsh_i:2> zsh -fc $'\n    [[ $ZSH_VERSION == (5.<8->*|<6->.*) ]] || return\n    exe=${${(M)0:#/*}:-$commands[$0]}\n    zmodload zsh/terminfo zsh/zselect && (( $#terminfo )) ||\n      [[ $ZSH_PATCHLEVEL == zsh-5.8-0-g77d203f && $exe == */bin/zsh &&\n         -e ${exe:h:h}/share/zsh/5.8/scripts/relocate ]]'
+_z4h_try_exec_zsh_i:7> return 0
+_z4h_exec_zsh_i:2> _z4h_try_exec_zsh_i /usr/local/bin/zsh -i
+_z4h_try_exec_zsh_i:1> command -v /usr/local/bin/zsh
+_z4h_try_exec_zsh_i:2> /usr/local/bin/zsh -fc $'\n    [[ $ZSH_VERSION == (5.<8->*|<6->.*) ]] || return\n    exe=${${(M)0:#/*}:-$commands[$0]}\n    zmodload zsh/terminfo zsh/zselect && (( $#terminfo )) ||\n      [[ $ZSH_PATCHLEVEL == zsh-5.8-0-g77d203f && $exe == */bin/zsh &&\n         -e ${exe:h:h}/share/zsh/5.8/scripts/relocate ]]'
+_z4h_try_exec_zsh_i:9> /usr/local/bin/zsh -i
Zsh For Humans installed successfully!

Next steps:

  - Your new personal Zsh config is in ~/.zshrc. Edit this file to export
    environment variables, define aliases, etc. There are plenty of examples and
    comments to get you started.

  - Install the recommended font from Powerlevel10k to enable additional glyphs
    in the terminal:

      https://github.com/romkatv/powerlevel10k/blob/master/font.md

    Then choose a new prompt style through the Powerlevel10k wizard:

      p10k configure

Enjoy Zsh For Humans!

╭─ 08:59:18  solutions1@mongo-duke  ~ ──────────────────────────────────────────────────────────────────────── valhalla@zeus  192.168.1.5  ✔ 
╰─▪ 

Which is the same output as what I showed you before but with the added z4h welcome banner...

kurktchiev commented 3 years ago

switched to v4 and it works without the mystery exit

romkatv commented 3 years ago

Maybe it takes a different code path if stderr is redirected.

Remote debugging is very time consuming. I suggest that you try to debug it and roll back to v4 if it doesn't work out. Sounds good?

kurktchiev commented 3 years ago

well 2> and | end up with getting into the shell and produce the same -x output. Is there any reason your tmux binary would read my default tmux.conf?

romkatv commented 3 years ago

Let's not continue. v4 works, right?

kurktchiev commented 3 years ago

lol, sure

iH8c0ff33 commented 3 years ago

@romkatv I had the same problem and tried to debug. If I install v5 cleanly it starts, and I can start more than one session.

But when I run z4h update the tmux binary is deleted, while the tmux server is still running. If I try to launch a new zsh now, it downloads a new tmux binary and then creates a new tmux session on the old server, but closes immediately (I didn't find anything interesting in the tmux client log).

When I kill the old tmux server, though, zsh works again (and starts a new tmux server). It seems to me that the problem is deleting and redownloading the tmux binary, but I don't use tmux very often so I'm not sure.

romkatv commented 3 years ago

@iH8c0ff33 Could you describe the steps to reproduce in more details? Something that I can follow exactly.

iH8c0ff33 commented 3 years ago

@romkatv Sure, the steps are:

romkatv commented 3 years ago

Thanks. For completeness, which OS are you using?

iH8c0ff33 commented 3 years ago

Sorry, forgot to mention I'm using Mac os

romkatv commented 3 years ago

I should now have everything necessary to reproduce this. Will give it a shot tomorrow or thereabouts.

iH8c0ff33 commented 3 years ago

Thanks.

Just FYI, I tried reproducing on linux (fedora with same, 5.8, zsh version) but couldn't. This problem may be related to Mac OS.

romkatv commented 3 years ago

Reopening so that I don't forget. I likely won't get to working on it any time soon.

ycardon commented 3 years ago

For the records I have the same problem here on a Mac.

Maybe related (or completely not)

Same logs as kurktchiev with a fresh z4h install

 ~  zsh -x                                                                      16:32:18
+/Users/ycardon/.zshenv:9> [ -n 5.8 ']'
+/Users/ycardon/.zshenv:10> : /Users/ycardon
+/Users/ycardon/.zshenv:11> setopt no_global_rcs
+/Users/ycardon/.zshenv:12> [[ -o no_interactive ]]
+/Users/ycardon/.zshenv:15> setopt no_rcs
+/Users/ycardon/.zshenv:16> unset Z4H_BOOTSTRAPPING
+/Users/ycardon/.zshenv:26> Z4H_URL=https://raw.githubusercontent.com/romkatv/zsh4humans/v5
+/Users/ycardon/.zshenv:27> : /Users/ycardon/.cache/zsh4humans/v5
+/Users/ycardon/.zshenv:29> umask o-w
+/Users/ycardon/.zshenv:31> [ '!' -e /Users/ycardon/.cache/zsh4humans/v5/z4h.zsh ']'
+/Users/ycardon/.zshenv:45> . /Users/ycardon/.cache/zsh4humans/v5/z4h.zsh
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:1> export 'TERM=xterm-256color'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:3> [ -n 5.8 ']'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:4> [ -n '' ']'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:13> typeset -gri '_z4h_source_called=1'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:15> emulate zsh
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:16> setopt always_to_end auto_cd auto_param_slash auto_pushd c_bases auto_menu extended_glob extended_history hist_expire_dups_first hist_find_no_dups hist_ignore_dups hist_ignore_space hist_verify interactive_comments multios no_aliases no_bg_nice no_bg_nice no_flow_control no_prompt_bang no_prompt_subst prompt_cr prompt_percent prompt_sp share_history typeset_silent hist_save_no_dups no_auto_remove_slash no_list_types no_beep
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:28> PS1=$'%B%F{2}%n@%m%f %F{4}%~%f\n%F{%(?.2.1)}%#%f%b '
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:30> RPS1='%B%F{3}z4h recovery mode%f%b'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:32> WORDCHARS=''
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:33> ZLE_REMOVE_SUFFIX_CHARS=''
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:34> HISTSIZE=1000000000
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:35> SAVEHIST=1000000000
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:37> [ -n '' ']'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:40> typeset -gri '_z4h_custom_histfile=0'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:41> HISTFILE=/Users/ycardon/.zsh_history
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:44> [ -n '' ']'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:49> [ '!' -e /tmp -a -e /var/folders/ds/xn7ybmyj1p95lpzyq5nq87440000gn/T/ ']'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:53> [ '' '!=' /Users/ycardon/.terminfo ']'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:53> [ -e /Users/ycardon/.terminfo/x/xterm-256color ']'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:54> export 'TERMINFO=/Users/ycardon/.terminfo'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:57> bindkey -d
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:58> bindkey -e
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:60> bindkey -s '^[OM' '^M'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:61> bindkey -s '^[Ok' +
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:62> bindkey -s '^[Om' -
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:63> bindkey -s '^[Oj' '*'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:64> bindkey -s '^[Oo' /
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:65> bindkey -s '^[OX' '='
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:66> bindkey -s '^[OH' '^[[H'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:67> bindkey -s '^[OF' '^[[F'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:68> bindkey -s '^[OA' '^[[A'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:69> bindkey -s '^[OB' '^[[B'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:70> bindkey -s '^[OD' '^[[D'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:71> bindkey -s '^[OC' '^[[C'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:72> bindkey -s '^[[1~' '^[[H'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:73> bindkey -s '^[[4~' '^[[F'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:74> bindkey -s '^[Od' '^[[1;5D'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:75> bindkey -s '^[Oc' '^[[1;5C'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:76> bindkey -s '^[^[[D' '^[[1;3D'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:77> bindkey -s '^[^[[C' '^[[1;3C'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:78> bindkey -s '^[[7~' '^[[H'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:79> bindkey -s '^[[8~' '^[[F'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:80> bindkey -s '^[[3\^' '^[[3;5~'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:81> bindkey -s '^[^[[3~' '^[[3;3~'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:82> bindkey -s '^[[1;9D' '^[[1;3D'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:83> bindkey -s '^[[1;9C' '^[[1;3C'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:85> bindkey '^[[H' beginning-of-line
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:86> bindkey '^[[F' end-of-line
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:87> bindkey '^[[3~' delete-char
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:88> bindkey '^[[3;5~' kill-word
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:89> bindkey '^[[3;3~' kill-word
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:90> bindkey '^[k' backward-kill-line
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:91> bindkey '^[K' backward-kill-line
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:92> bindkey '^[j' kill-buffer
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:93> bindkey '^[J' kill-buffer
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:94> bindkey '^[/' redo
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:95> bindkey '^[[1;3D' backward-word
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:96> bindkey '^[[1;5D' backward-word
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:97> bindkey '^[[1;3C' forward-word
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:98> bindkey '^[[1;5C' forward-word
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:100> set -A _z4h_script_argv
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:103> [ -n /Users/ycardon/.cache/zsh4humans/v5 ']'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:104> [ https://raw.githubusercontent.com/romkatv/zsh4humans/v5 '=' https://raw.githubusercontent.com/romkatv/zsh4humans/v5 ']'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:105> [ -z '' -a -r /Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh ']'
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:106> . /Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:1> [ -z 5.8 ']'
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:1> eval '[[ "$ZSH_VERSION" == (5.<8->*|<6->.*) ]]'
+(eval):1> [[ 5.8 == (5.<8->*|<6->.*) ]]
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:5> '(anon)'
+(anon):1> [[ -x /proc/self/exe ]]
+(anon):4> emulate zsh -o posix_argzero -c 'local exe=${0#-}'
+(eval):1> local exe=zsh
+(anon):5> [[ /usr/local/bin/zsh == /* && zsh == zsh && -x /usr/local/bin/zsh ]]
+(anon):6> exe=/usr/local/bin/zsh
+(anon):16> typeset -gr _z4h_exe=/usr/local/bin/zsh
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:30> [[ ! -o interactive ]]
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:36> typeset -gr _z4h_opt=$'emulate -L zsh &&\n  setopt typeset_silent pipe_fail extended_glob prompt_percent no_prompt_subst &&\n  setopt no_prompt_bang no_bg_nice no_aliases'
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:40> zmodload zsh/datetime zsh/langinfo zsh/parameter zsh/stat zsh/system zsh/terminfo zsh/zutil
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:41> zmodload -F zsh/files b:zf_mkdir b:zf_mv b:zf_rm b:zf_rmdir b:zf_ln
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:43> '(anon)' /Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh
+(anon):1> [[ /Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh != /Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh ]]
+(anon):5> typeset -gr _z4h_param_pat=$'ZDOTDIR=$ZDOTDIR\C-@Z4H=$Z4H\C-@Z4H_URL=$Z4H_URL'
+(anon):6> typeset -gr _z4h_param_sig=$'ZDOTDIR=/Users/ycardon\C-@Z4H=/Users/ycardon/.cache/zsh4humans/v5\C-@Z4H_URL=https://raw.githubusercontent.com/romkatv/zsh4humans/v5'
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:59> export -T MANPATH=: manpath
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:60> export -T INFOPATH=: infopath
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:61> typeset -gaU cdpath fpath mailpath path manpath infopath
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:63> fpath=( /usr/local/share/zsh/site-functions /usr/local/share/zsh/site-functions /usr/share/zsh/site-functions /usr/share/zsh/5.8/functions /Users/ycardon/.cache/zsh4humans/v5/zsh4humans/fn )
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:70> autoload -Uz -- -z4h-autosuggest-fetch -z4h-brew-command-not-found -z4h-cd-rotate -z4h-chsh -z4h-cmd-bindkey -z4h-cmd-compile -z4h-cmd-help -z4h-cmd-ssh -z4h-cmd-sudo -z4h-cmd-update -z4h-comp-files -z4h-comp-insert-all -z4h-comp-words -z4h-compile -z4h-complete-cargo -z4h-complete-helm -z4h-complete-kitty -z4h-complete-kubectl -z4h-complete-rustup -z4h-error-command -z4h-error-param-changed -z4h-find -z4h-flowing -z4h-fzf -z4h-gen-init-darwin-paths -z4h-get-cursor-pos -z4h-gnu-command-not-found -z4h-help-bindkey -z4h-help-compile -z4h-help-source -z4h-help-ssh -z4h-init -z4h-init-wsl -z4h-insert-all -z4h-install-many -z4h-install-one -z4h-main-complete -z4h-move-and-kill -z4h-postinstall-fzf -z4h-postinstall-powerlevel10k -z4h-postinstall-systemd -z4h-postinstall-terminfo -z4h-postinstall-zsh-autosuggestions -z4h-postinstall-zsh-syntax-highlighting -z4h-present-files -z4h-prompt-length -z4h-redraw-buffer -z4h-redraw-prompt -z4h-restore-screen -z4h-run-process-tree -z4h-sanitize-word-prefix -z4h-save-screen -z4h-set-list-colors -z4h-set-term-title -z4h-show-dots -z4h-ssh-maybe-update -z4h-welcome -z4h-with-local-history -z4h-zle-line-finish -z4h-zle-line-init -z4h-zle-line-pre-redraw _z4h_err z4h-autosuggest-accept z4h-backward-word z4h-backward-zword z4h-cd-down z4h-clear-screen-hard-bottom z4h-clear-screen-hard-top z4h-clear-screen-soft-bottom z4h-clear-screen-soft-top z4h-forward-word z4h-forward-zword z4h-fzf-complete z4h-fzf-history z4h-stash-buffer
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:71> functions -Ms _z4h_err
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:73> [[ darwin20.0 == darwin* ]]
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:74> [[ ! -e /Users/ycardon/.cache/zsh4humans/v5/cache/init-darwin-paths ]]
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:74> source /Users/ycardon/.cache/zsh4humans/v5/cache/init-darwin-paths
+/Users/ycardon/.cache/zsh4humans/v5/cache/init-darwin-paths:1> '(anon)'
+(anon):1> local -a stat
+(anon):2> zstat -A stat +mtime -- /usr/libexec/path_helper /etc/paths /etc/paths.d /etc/manpaths /etc/manpaths.d /etc/paths.d/40-XQuartz /etc/paths.d/at.obdev.littlesnitch /etc/manpaths.d/40-XQuartz
+(anon):3> [[ '1577865600 1577865600 1605258557 1577865600 1605253789 1477471882 1605263765 1477471882' == 1577865600\ 1577865600\ 1605258557\ 1577865600\ 1605253789\ 1477471882\ 1605263765\ 1477471882 ]]
+(anon):4> local path_dirs=( /usr/local/bin /usr/bin /bin /usr/sbin /sbin '/Applications/Little Snitch.app/Contents/Components' /opt/X11/bin )
+(anon):5> local manpath_dirs=( /usr/share/man /usr/local/share/man /opt/X11/share/man )
+(anon):6> path=( /usr/local/bin '/Applications/Little Snitch.app/Contents/Components' /opt/X11/bin /Users/ycardon/Dev/tools/google-cloud-sdk/bin /Users/ycardon/.nix-profile/bin /usr/bin /bin /usr/sbin /sbin /Users/ycardon/bin /usr/local/sbin /Users/ycardon/Library/Python/3.7/bin /Users/ycardon/.cargo/bin /usr/local/opt/node.js/bin /Users/ycardon/.krew/bin )
+(anon):7> manpath=( /usr/share/man /usr/local/share/man /opt/X11/share/man )
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:79> path=( /Users/ycardon/.cache/zsh4humans/v5/fzf/bin /usr/local/bin '/Applications/Little Snitch.app/Contents/Components' /opt/X11/bin /Users/ycardon/Dev/tools/google-cloud-sdk/bin /Users/ycardon/.nix-profile/bin /usr/bin /bin /usr/sbin /sbin /Users/ycardon/bin /usr/local/sbin /Users/ycardon/Library/Python/3.7/bin /Users/ycardon/.cargo/bin /usr/local/opt/node.js/bin /Users/ycardon/.krew/bin )
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:80> manpath=( /Users/ycardon/.cache/zsh4humans/v5/fzf/man /usr/share/man /usr/local/share/man /opt/X11/share/man '' )
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:81> [[ /usr/local/bin/zsh == /usr/local/bin/zsh ]]
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:83> : /Users/ycardon/.cache/zsh4humans/v5/cache/gitstatus
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:84> : /Users/ycardon/.cache/zsh4humans/v5/ohmyzsh/ohmyzsh
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:85> : /Users/ycardon/.cache/zsh4humans/v5/ohmyzsh/ohmyzsh/custom
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:86> : /Users/ycardon/.cache/zsh4humans/v5/cache/ohmyzsh
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:88> [[ darwin20.0 == linux* ]]
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:102> '(anon)' /Users/ycardon/bin /Users/ycardon/.local/bin /Users/ycardon/.cargo/bin /usr/local/bin
+(anon):1> path=( /Users/ycardon/.local/bin /Users/ycardon/.cache/zsh4humans/v5/fzf/bin /usr/local/bin '/Applications/Little Snitch.app/Contents/Components' /opt/X11/bin /Users/ycardon/Dev/tools/google-cloud-sdk/bin /Users/ycardon/.nix-profile/bin /usr/bin /bin /usr/sbin /sbin /Users/ycardon/bin /usr/local/sbin /Users/ycardon/Library/Python/3.7/bin /Users/ycardon/.cargo/bin /usr/local/opt/node.js/bin /Users/ycardon/.krew/bin )
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:106> [[ zsh-5.8-0-g77d203f == zsh-5.8-0-g77d203f && /usr/local/bin/zsh == */bin/zsh && -e /usr/local/share/zsh/5.8/scripts/relocate ]]
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:108> [[ /Users/ycardon/.terminfo != /Users/ycardon/.terminfo ]]
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:112> [[ -e /usr/local/share/man ]]
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:113> manpath=( /usr/local/share/man /Users/ycardon/.cache/zsh4humans/v5/fzf/man /usr/share/man /usr/local/share/man /opt/X11/share/man '' )
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:117> [[ 501 == 0 ]]
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:120> typeset -gri _z4h_dangerous_root=0
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:302> [[ '' != <1->:* ]]
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:304> typeset -gr _z4h_orig_shell=/usr/local/bin/zsh
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:306> ((  !EUID || 0  ))
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:307> zstyle -T :z4h: chsh
+/Users/ycardon/.cache/zsh4humans/v5/zsh4humans/main.zsh:308> [[ /usr/local/bin/zsh == /usr/local/bin/zsh ]]
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:107> setopt aliases
+/Users/ycardon/.cache/zsh4humans/v5/z4h.zsh:108> return
+/Users/ycardon/.zshenv:47> setopt rcs
+/Users/ycardon/.zshrc:8> zstyle :z4h: auto-update ask
+/Users/ycardon/.zshrc:10> zstyle :z4h: auto-update-days 28
+/Users/ycardon/.zshrc:13> zstyle :z4h:bindkey keyboard mac
+/Users/ycardon/.zshrc:16> zstyle :z4h:autosuggestions forward-char accept
+/Users/ycardon/.zshrc:20> zstyle :z4h:ssh:example-hostname1 enable yes
+/Users/ycardon/.zshrc:21> zstyle ':z4h:ssh:*.example-hostname2' enable no
+/Users/ycardon/.zshrc:23> zstyle ':z4h:ssh:*' enable no
+/Users/ycardon/.zshrc:27> zstyle ':z4h:ssh:*' send-extra-files '~/.iterm2_shell_integration.zsh'
+/Users/ycardon/.zshrc:30> zstyle :zle:up-line-or-beginning-search leave-cursor yes
+/Users/ycardon/.zshrc:31> zstyle :zle:down-line-or-beginning-search leave-cursor yes
+/Users/ycardon/.zshrc:38> z4h install ohmyzsh/ohmyzsh
+z4h:1> ((  1  ))
+z4h:2> -z4h-cmd-install ohmyzsh/ohmyzsh
+-z4h-cmd-install:1> eval $'emulate -L zsh &&\n  setopt typeset_silent pipe_fail extended_glob prompt_percent no_prompt_subst &&\n  setopt no_prompt_bang no_bg_nice no_aliases'
+(eval):1> emulate -L zsh
+(eval):2> setopt typeset_silent pipe_fail extended_glob prompt_percent no_prompt_subst
+(eval):3> setopt no_prompt_bang no_bg_nice no_aliases
+-z4h-cmd-install:2> -z4h-check-core-params
+-z4h-check-core-params:1> [[ $'ZDOTDIR=/Users/ycardon\C-@Z4H=/Users/ycardon/.cache/zsh4humans/v5\C-@Z4H_URL=https://raw.githubusercontent.com/romkatv/zsh4humans/v5' == ZDOTDIR=/Users/ycardonZ4H=/Users/ycardon/.cache/zsh4humans/v5Z4H_URL=https://raw.githubusercontent.com/romkatv/zsh4humans/v5 ]]
+-z4h-cmd-install:4> local -a flush
+-z4h-cmd-install:5> zparseopts -D -F -- 'f=flush' '-flush=flush'
+-z4h-cmd-install:7> local invalid=( )
+-z4h-cmd-install:8> ((  0  ))
+-z4h-cmd-install:14> _z4h_install_queue+=( ohmyzsh/ohmyzsh )
+-z4h-cmd-install:15> ((  0 && 1  ))
+-z4h-cmd-install:15> return 0
+/Users/ycardon/.zshrc:44> z4h init
+z4h:1> ((  1  ))
+z4h:2> -z4h-cmd-init
+-z4h-cmd-init:1> ((  ARGC  ))
+-z4h-cmd-init:5> ((  0  ))
+-z4h-cmd-init:17> -z4h-check-core-params
+-z4h-check-core-params:1> [[ $'ZDOTDIR=/Users/ycardon\C-@Z4H=/Users/ycardon/.cache/zsh4humans/v5\C-@Z4H_URL=https://raw.githubusercontent.com/romkatv/zsh4humans/v5' == ZDOTDIR=/Users/ycardonZ4H=/Users/ycardon/.cache/zsh4humans/v5Z4H_URL=https://raw.githubusercontent.com/romkatv/zsh4humans/v5 ]]
+-z4h-cmd-init:18> typeset -gri _z4h_init_called=1
+-z4h-cmd-init:20> '(anon)'
+(anon):1> eval $'emulate -L zsh &&\n  setopt typeset_silent pipe_fail extended_glob prompt_percent no_prompt_subst &&\n  setopt no_prompt_bang no_bg_nice no_aliases'
+(eval):1> emulate -L zsh
+(eval):2> setopt typeset_silent pipe_fail extended_glob prompt_percent no_prompt_subst
+(eval):3> setopt no_prompt_bang no_bg_nice no_aliases
+(anon):3> [[ x86_64 != x86_64 || darwin20.0 != (linux|darwin)* ]]
+(anon):4> zstyle -T :z4h start-tmux integrated
+(anon):5> local -i install_tmux=1 need_restart
+(anon):7> ((  0 || 0  ))
+(anon):7> [[ -o zle && -t 0 && -t 1 && -t 2 ]]
+(anon):10> [[ '' == true ]]
+(anon):13> local tmux=/Users/ycardon/.cache/zsh4humans/v5/tmux/bin/tmux
+(anon):14> local -a match mbegin mend
+(anon):15> [[ '' == (#b)(/*),(|<->),(|<->) ]]
+(anon):35> ((  install_tmux  ))
+(anon):36> [[ -z '' && ! -w '' && -z '' ]]
+(anon):37> unset _Z4H_TMUX _Z4H_TMUX_CMD TMUX TMUX_PANE
+(anon):38> [[ -x /Users/ycardon/.cache/zsh4humans/v5/tmux/bin/tmux && -d /Users/ycardon/.cache/zsh4humans/v5/terminfo ]]
+(anon):39> local sock
+(anon):40> [[ -n '' ]]
+(anon):42> [[ -n /var/folders/ds/xn7ybmyj1p95lpzyq5nq87440000gn/T/ && -d /var/folders/ds/xn7ybmyj1p95lpzyq5nq87440000gn/T/ && -w /var/folders/ds/xn7ybmyj1p95lpzyq5nq87440000gn/T/ ]]
+(anon):43> sock=/var/folders/ds/xn7ybmyj1p95lpzyq5nq87440000gn/T/
+(anon):47> [[ -n /var/folders/ds/xn7ybmyj1p95lpzyq5nq87440000gn/T/ ]]
+(anon):48> sock=/var/folders/ds/xn7ybmyj1p95lpzyq5nq87440000gn/T/z4h-tmux-501-xterm-256color
+(anon):49> local cfg=tmux-16color.conf
+(anon):50> ((  terminfo[colors] >= 256  ))
+(anon):50> cfg=tmux-256color.conf
+(anon):51> SHELL=/usr/local/bin/zsh /Users/ycardon/.cache/zsh4humans/v5/tmux/bin/tmux -u -S /var/folders/ds/xn7ybmyj1p95lpzyq5nq87440000gn/T/z4h-tmux-501-xterm-256color -f /Users/ycardon/.cache/zsh4humans/v5/zsh4humans/tmux-256color.conf
[exited]
ycardon commented 3 years ago

for the records again, I've switched back to v5 on macOS : no more problem... (iTerm2 have been updated, that might explain)

romkatv commented 3 years ago

@ycardon Ack. I haven't looked at this issue yet. Sorry about that. I don't consider it high priority because its downside is that mac users have to restart all their shells when updating z4h. This is obviously unacceptable for a stable version but for a dev branch this kind of inconvenience once a month is OK. If there are some other downsides, please let me know and I'll reprioritize investigating it.

By the way, I'm posting notifications about backward incompatible changes in v5 to #35. You might want to subscribe. I can also post them to https://gitter.im/romkatv-zsh4humans/community if someone asks for it.

ycardon commented 3 years ago

I'm posting notifications about backward incompatible changes in v5 to #35. You might want to subscribe.

I've discovered this issue and subscribed to it a couple of hours before reading your message ^^

tumd commented 3 years ago

Is there any progress on this? I'm on v5 and a heavy user of tmux. Creating new windows in tmux still works, but spawning a new tabs/windows in iTerm2 causes it to immediately close. Only way I have found around this is to create a new profile in iTerm2 that uses bash as login-shell. But if I ssh to localhost or another machine (mac) running z4h the terminal closes.

Here is (a chopped) output from starting zsh from bash;

rupert:~ twan$ zsh --verbose
rupert:~ twan$ zsh --verbose
# Documentation: https://github.com/romkatv/zsh4humans/blob/v5/README.md.
#
# Do not modify this file unless you know exactly what you are doing.
# It is strongly recommended to keep all shell customization and configuration
# (including exported environment variables such as PATH) in ~/.zshrc or in
# files sourced from ~/.zshrc. If you are certain that you must export some
# environment variables in ~/.zshenv, do it where indicated by comments below.

if [ -n "${ZSH_VERSION-}" ]; then
  : ${ZDOTDIR:=~}
  setopt no_global_rcs
  if [[ -o no_interactive && -z "${Z4H_BOOTSTRAPPING-}" ]]; then
    return
  fi
  setopt no_rcs
  unset Z4H_BOOTSTRAPPING

...

# Install or update core components (fzf, zsh-autosuggestions, etc.) and
# initialize Zsh. After this point console I/O is unavailable until Zsh
# is fully initialized. Everything that requires user interaction or can
# perform network I/O must be done above. Everything else is best done below.
z4h init || return
[exited]
rupert:~ twan$ 62;4cTERM2 3.4.4n
romkatv commented 3 years ago

@tumd This issue (#71) has a workaround: restart all your shells after updating z4h (reboot if in doubt). Does this work for you?

ciscohack commented 3 years ago

I also faced same issue and found killing all the running ZSH process as workaround and this issue is more often for me after creating multiple sessions. I don't see any progress on v5.

romkatv commented 3 years ago

@ciscohack I haven't made any progress (or even attempted to) fix this issue. The workaround (close all shells) should work.

ciscohack commented 3 years ago

@ciscohack I haven't made any progress (or even attempted to) fix this issue. The workaround (close all shells) should work.

Yes that is what i am doing currently. Thanks

romkatv commented 3 years ago

There is apparently a bug in tmux on macos that can be reproduced as follows:

  1. Configure your terminal emulator to start zsh -f or any other shell as long as it won't start tmux automatically.
  2. Open a terminal tab.
  3. Install tmux: brew install tmux
  4. Start tmux
  5. Reinstall tmux: brew reinstall tmux
  6. Open another terminal tab.
  7. Start tmux in the new tab.

This isn't specific to homebrew. The same happens if you compile and install tmux manually.

The best thing to do would be to find the cause of this bug and fix it. It would also be nice to report this upstream. I haven't done any of those things and instead implemented a workaround in zsh4humans. Once you run z4h update, you should no longer be affected by this issue. Please let me know whether it helps or not.

ciscohack commented 3 years ago

There is apparently a bug in tmux on macos that can be reproduced as follows:

  1. Configure your terminal emulator to start zsh -f or any other shell as long as it won't start tmux automatically.
  2. Open a terminal tab.
  3. Install tmux: brew install tmux
  4. Start tmux
  5. Reinstall tmux: brew reinstall tmux
  6. Open another terminal tab.
  7. Start tmux in the new tab.
  • Expected: the last step starts your login shell.
  • Actual: on the last step tmux exits immediately, sometimes also printing garbage.

This isn't specific to homebrew. The same happens if you compile and install tmux manually.

The best thing to do would be to find the cause of this bug and fix it. It would also be nice to report this upstream. I haven't done any of those things and instead implemented a workaround in zsh4humans. Once you run z4h update, you should no longer be affected by this issue. Please let me know whether it helps or not.

Thanks for looking into it further. yes you are correct issue might be with tmux. I used workround added by you. so far after z4h update not seen the issue. will keep it on monitoring. Thanks once again

romkatv commented 3 years ago

I believe this is fixed.