[x] I've checked the Changelog and I'm not being affected by documented changes.
[x] I've checked the 📢 Announcements and I'm not being affected by announced changes.
[x] I was able to reproduce the issue with a clean installation of Zim.
[x] I've pasted the output of zimfw info below.
Describe the bug
Shell hangs after executing a command inside a git repository, prompt is not shown
Steps to reproduce
The fist 4 steps restart the shell with a clean installation of Zim in a temporary directory.
Use exec zsh when restarting the terminal or restarting the shell is needed.
zstyle ':zim:git-info' verbose yes
zstyle ':zim:git-info:branch' format '%b'
zstyle ':zim:git-info:commit' format '%c'
zstyle ':zim:git-info:clean' format '%F{green}'
zstyle ':zim:git-info:dirty' format '%F{yellow}'
zstyle ':zim:git-info:keys' format 'prompt' ' %F{blue}git:(%F{cyan}%C%D%b%c%F{blue})%f'
Current behavior
Shell hangs after executing a command inside a git repository, prompt is not shown
Expected behavior
Prompt is shown
zimfw info
zimfw version: 1.9.1 (built at 2022-05-24 21:25:10 UTC, previous commit is 5bcfb8c)
ZIM_HOME: /home/dmaes/.config/zim
Zsh version: 5.9
System info: Linux inuits-t490 5.19.2-1-default #1 SMP PREEMPT_DYNAMIC Thu Aug 18 05:06:49 UTC 2022 (6c252ef) x86_64 x86_64 x86_64 GNU/Linux
Additional context
While debugging, it seems the problem lies with the asynchronously running of $cmds. Hanging happens when $cmds is empty. As much as adding a simple /bin/true to the $cmds array when in the if ! zstyle -t ':zim:git-info' verboseelse-block fixes this.
zimfw
.zimfw info
below.Describe the bug
Shell hangs after executing a command inside a git repository, prompt is not shown
Steps to reproduce
The fist 4 steps restart the shell with a clean installation of Zim in a temporary directory. Use
exec zsh
when restarting the terminal or restarting the shell is needed.cd ${$(mktemp -d):A}
ZDOTDIR=${PWD} HOME=${PWD} ZIM_HOME=${PWD}/.zim exec zsh
curl -fsSL https://raw.githubusercontent.com/zimfw/install/master/install.zsh | zsh
exec zsh
Current behavior
Shell hangs after executing a command inside a git repository, prompt is not shown
Expected behavior
Prompt is shown
zimfw info
Additional context
While debugging, it seems the problem lies with the asynchronously running of
$cmds
. Hanging happens when$cmds
is empty. As much as adding a simple/bin/true
to the$cmds
array when in theif ! zstyle -t ':zim:git-info' verbose
else
-block fixes this.