Hi, probably quite unlikely to happen but I wanted to see if the builtin direnv integration worked without direnv installed. (No, it does not). I managed to break z4h this way, so I thought the workaround might be useful to someone.
Error on launch of new zsh
--- stack trace (most recent call first) ---
/root/.cache/zsh4humans/v5/zsh4humans/fn/-z4h-direnv-init:6
/root/.zshrc:406
/root/.cache/zsh4humans/v5/zsh4humans/main.zsh:208
/root/.cache/zsh4humans/v5/zsh4humans/main.zsh:465
/root/.zshrc:56
zsh:0
--- end of stack trace ---
--- stack trace (most recent call first) ---
/root/.zshrc:406
/root/.cache/zsh4humans/v5/zsh4humans/main.zsh:208
/root/.cache/zsh4humans/v5/zsh4humans/main.zsh:465
/root/.zshrc:56
zsh:0
Step to reproduce
- run:
docker run -e TERM -e COLORTERM -e LC_ALL=C.UTF-8 -w /root -it --detach-keys="ctrl-^,ctrl-@" --rm alpine sh -uec '
apk add zsh curl tmux direnv
sh -c "$(curl -fsSL https://raw.githubusercontent.com/romkatv/zsh4humans/v5/install)"'
- Go through wizard with:
11nyy and q to quit p10k wizard
apk del direnv
- Check a file (foreshadowing):
# cat ~/.cache/zsh4humans/v5/cache/direnv
typeset direnv=/usr/bin/direnv
exec zsh (q p10k wizard) and check file again. It is still there but empty.
exec zsh yields the error from above
Workaround
Delete ~/.cache/zsh4humans/v5/cache/direnv
Hi, probably quite unlikely to happen but I wanted to see if the builtin direnv integration worked without direnv installed. (No, it does not). I managed to break z4h this way, so I thought the workaround might be useful to someone.
Error on launch of new zsh
Step to reproduce
11nyyandqto quit p10k wizardapk del direnvexec zsh(qp10k wizard) and check file again. It is still there but empty.exec zshyields the error from aboveWorkaround
Delete
~/.cache/zsh4humans/v5/cache/direnv