aboutsummaryrefslogtreecommitdiff
path: root/config/zsh
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2021-09-08 13:07:39 +0200
committerCharles Cabergs <me@cacharle.xyz>2021-09-08 13:07:39 +0200
commite1aa4781986d5d5159e942d2c551fd105ca4235a (patch)
tree97be9113dda7e773567eb36ab6e0c00d2f089ee1 /config/zsh
parentc27ec9af26ee58d10c8a4120eb30ea30ed3e48dd (diff)
downloaddotfiles-e1aa4781986d5d5159e942d2c551fd105ca4235a.tar.gz
dotfiles-e1aa4781986d5d5159e942d2c551fd105ca4235a.tar.bz2
dotfiles-e1aa4781986d5d5159e942d2c551fd105ca4235a.zip
Updated zshrc to exit with Ctrl+D even when there is characters in the command line
Diffstat (limited to 'config/zsh')
-rw-r--r--config/zsh/.zshrc7
1 files changed, 7 insertions, 0 deletions
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