From 6447f00ce32c4d166518e72a3401acc9c8645fea Mon Sep 17 00:00:00 2001 From: Anthony Perkins Date: Thu, 18 Aug 2022 17:11:43 +0100 Subject: [PATCH] Set emacs keybindings in zsh --- roles/home-cli/files/bashrc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/roles/home-cli/files/bashrc b/roles/home-cli/files/bashrc index b0c6f13..d600e8f 100644 --- a/roles/home-cli/files/bashrc +++ b/roles/home-cli/files/bashrc @@ -87,12 +87,6 @@ done umask 0022 -if [ -z "$ZSH_VERSION" ] -then - set -o emacs - set -o noclobber -fi - # Locale and language. ## Clear the existing locale settings and set options I always want. export TIME_STYLE=long-iso # Used by GNU 'ls'. @@ -143,6 +137,8 @@ fi if [ -n "$BASH_VERSION" ] then + set -o emacs + set -o noclobber shopt -s histappend bind '"\e[1;5C": forward-word' bind '"\e[1;5D": backward-word' @@ -153,6 +149,7 @@ then bind 'set enable-bracketed-paste off' elif [ -n "$ZSH_VERSION" ] then + bindkey -e bindkey "^[[A" history-beginning-search-backward bindkey "^[[B" history-beginning-search-forward fi