From e1aa4781986d5d5159e942d2c551fd105ca4235a Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 8 Sep 2021 13:07:39 +0200 Subject: Updated zshrc to exit with Ctrl+D even when there is characters in the command line --- config/zsh/.zshrc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'config/zsh') diff --git a/config/zsh/.zshrc b/config/zsh/.zshrc index 0b28a0f..77ee41e 100644 --- a/config/zsh/.zshrc +++ b/config/zsh/.zshrc @@ -65,6 +65,13 @@ chpwd() { [ "$(stat -c "%U" .)" = "$USER" ] && touch . # to sort by last cd } +# https://wiki.archlinux.org/title/Zsh#Shortcut_to_exit_shell_on_partial_command_line +exit_zsh() { + exit +} +zle -N exit_zsh +bindkey '^D' exit_zsh + # shellcheck disable=SC2034,SC2039,SC3030 fignore=(o hi) # ignore extensions in autocomplete -- cgit