From 388772f1be2cad6d6141f85b18eb8a4d1ce1b9ae Mon Sep 17 00:00:00 2001 From: sev Date: Sun, 22 Dec 2024 11:49:04 -0600 Subject: [PATCH] zshrc: catch zkbd errors and continue rare codepath but we don't want the interactive zkbd to kill our login --- etc/zsh/.zshrc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/etc/zsh/.zshrc b/etc/zsh/.zshrc index 402a9e7..85e3d64 100644 --- a/etc/zsh/.zshrc +++ b/etc/zsh/.zshrc @@ -145,8 +145,12 @@ if [[ ! -v _sev_force_zkbd && ( -v terminfo || -v termcap ) ]] { if [[ -z $keymap ]] { if (read -q "?Can't read terminfo. Add new zkbd keymap? [y/N]") { echo - autoload -Uz zkbd && zkbd - unfunction zkbd + { + autoload -Uz zkbd && zkbd + } always { + TRY_BLOCK_ERROR=0 + unfunction zkbd + } find_keymap } echo -- 2.48.1