From e7a8e4fd61115e34fc0013b15402a4748b58fc67 Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Wed, 14 Sep 2022 21:56:07 +0100 Subject: [PATCH] Zsh keybindings --- roles/home-cli/files/bash_profile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/roles/home-cli/files/bash_profile b/roles/home-cli/files/bash_profile index 50941b8..4cd44c2 100644 --- a/roles/home-cli/files/bash_profile +++ b/roles/home-cli/files/bash_profile @@ -75,9 +75,22 @@ then bind 'set completion-ignore-case on' bind 'set enable-bracketed-paste off' PS1="\[\033[01m\]\u@\h\\$\[\033[00m\] " + elif [ -n "$ZSH_VERSION" ] then + autoload -Uz compinit && compinit + zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' + bindkey -e + + bindkey "^[[1;5C" forward-word + bindkey "^[[1;5D" backward-word + bindkey "^[[3~" delete-char + bindkey "^[[A" history-beginning-search-backward + bindkey "^[[B" history-beginning-search-forward + bindkey "^[OA" history-beginning-search-backward + bindkey "^[OB" history-beginning-search-forward PS1="%B%n@%m%#%b " + fi _acp_add_path () {