From 73f771d092d692ce5a55785adf16238919544491 Mon Sep 17 00:00:00 2001 From: TomfromBerlin Date: Mon, 23 Mar 2026 23:37:52 +0100 Subject: [PATCH] Make Ctrl+C work - zsh-autocomplete defines its own TRAPINT() function in a global scope. That is, every other TRAPINT() function defined by the user or other plugins will be overwritten immediately, when autocomplete is active. This leads to unexpected and had to trace behavior, e.g. if there is a 'read -sk1' and Ctrl+C is pressed, strange error messages appear. The work around is 'read -sk1 || return 1' --- functions/zramdisk_benchmark | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/zramdisk_benchmark b/functions/zramdisk_benchmark index b889db9..e6e6587 100644 --- a/functions/zramdisk_benchmark +++ b/functions/zramdisk_benchmark @@ -58,7 +58,7 @@ zramdisk_debug "${ZRAMDISK_COLOR_GREEN}zramdisk_benchmark:${ZRAMDISK_COLOR_NC} R print -P "${ZRAMDISK_COLOR_MAGENTA_DIM}├${line}┤${ZRAMDISK_COLOR_NC}" print -P "${ZRAMDISK_COLOR_MAGENTA_DIM}│${ZRAMDISK_COLOR_BLUE_BOLD} Press any key to continue... ${ZRAMDISK_COLOR_MAGENTA_DIM}│${ZRAMDISK_COLOR_NC}" print -P "${ZRAMDISK_COLOR_MAGENTA_DIM}╰${line}╯${ZRAMDISK_COLOR_NC}" - read -sk 1 + read -sk 1 || return 1 echo print -P "The following table shows some benchmark results for a ZRAM swap device." print -P "${ZRAMDISK_COLOR_MAGENTA_DIM}╭──────────┬──────────────┬───────┬─────────┬──────────────┬─────────────╮${ZRAMDISK_COLOR_NC}"