From d6616cf08b8b7af26050f993bd2c0b742fbe78fe Mon Sep 17 00:00:00 2001 From: Gioele De Vitti Date: Fri, 11 Nov 2022 18:38:57 +0100 Subject: [PATCH] Stop trapping SIGINT to allow further use of Ctrl+C once lfcd is closed (#1231) * Avoid expansion of file path containing spaces * Do not trap INT signal on lfcd * Untrap to stop trapping once lfcd quit * Revert "Avoid expansion of file path containing spaces" This reverts commit edcccf8f1bb0eb283aa332dc3a2d2b431eb6d189. * Trap SIGINT again --- .config/zsh/.zshrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 7e96734..c46f51d 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -54,7 +54,7 @@ preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt. # Use lf to switch directories and bind it to ctrl-o lfcd () { tmp="$(mktemp -uq)" - trap 'rm -f $tmp >/dev/null 2>&1' HUP INT QUIT TERM PWR EXIT + trap 'rm -f $tmp >/dev/null 2>&1 && trap - HUP INT QUIT TERM PWR EXIT' HUP INT QUIT TERM PWR EXIT lf -last-dir-path="$tmp" "$@" if [ -f "$tmp" ]; then dir="$(cat "$tmp")"