about summary refs log tree commit diff
path: root/hosts/home.nix
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2022-06-19 16:41:53 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2022-06-19 16:41:53 +0200
commit5ee0b2b5c8ac42c7286e072541eeeeb7254f01e6 (patch)
tree491373c562916a57c52ea89caae28e781c792024 /hosts/home.nix
parentfmt (diff)
downloadnixos-config-5ee0b2b5c8ac42c7286e072541eeeeb7254f01e6.tar.gz
nixos-config-5ee0b2b5c8ac42c7286e072541eeeeb7254f01e6.tar.bz2
nixos-config-5ee0b2b5c8ac42c7286e072541eeeeb7254f01e6.zip
Change zsh config to fix up history
Diffstat (limited to 'hosts/home.nix')
-rw-r--r--hosts/home.nix10
1 files changed, 6 insertions, 4 deletions
diff --git a/hosts/home.nix b/hosts/home.nix
index c581863..96ab3c7 100644
--- a/hosts/home.nix
+++ b/hosts/home.nix
@@ -128,17 +128,19 @@ in
       };
 
       initExtra = ''
+        autoload -U history-search-end #needed for -end
+        zle -N history-beginning-search-backward-end history-search-end
+        zle -N history-beginning-search-forward-end history-search-end
+
         #when going up go up only beggining of curr word history
-        bindkey '\e[A' history-search-backward
-        bindkey '\e[B' history-search-forward
+        bindkey '\e[A' history-beginning-search-backward-end
+        bindkey '\e[B' history-beginning-search-forward-end
         #ctrl + arrow forward/backward word
         bindkey "^[[1;5C" forward-word
         bindkey "^[[1;5D" backward-word
         #alt + arrow forward/backward word
         bindkey "^[[1;3C" forward-word
         bindkey "^[[1;3D" backward-word
-        #ctrl + delete delete whole word
-        bindkey '^H' backward-kill-word
         #alt + delete delete whole word
         bindkey "\e\x7f" backward-kill-word
       '';