bash/zsh: fix line movements/history ➡ - dotfiles - personal arsenal of "rice"
HTML git clone https://git.drkhsh.at/dotfiles.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit fa08374478cf75bd6fdfd6b5bbffa18826aab46e
DIR parent abb9eb3a2c84d82bac6dbfdc9a59c7ccbb02f0c6
HTML Author: drkhsh <me@drkhsh.at>
Date: Tue, 18 Jul 2023 11:27:38 +0200
bash/zsh: fix line movements/history ➡
Diffstat:
M bash/.bashrc | 4 ++++
M zsh/.zshrc | 12 ++++--------
2 files changed, 8 insertions(+), 8 deletions(-)
---
DIR diff --git a/bash/.bashrc b/bash/.bashrc
@@ -39,6 +39,10 @@ shopt -s histappend
PROMPT_COMMAND='history -a' # save hist immediately
export HISTCONTROL=ignorespace:ignoredups
+# plan9-like completion
+bind 'Control-f: menu-complete'
+bind "set show-all-if-ambiguous on"
+
# machine-specific bashrc
if [[ -f ~/.bashrc.local ]]; then
source ~/.bashrc.local
DIR diff --git a/zsh/.zshrc b/zsh/.zshrc
@@ -66,20 +66,16 @@ zstyle ':completion:*:sudo:*' command-path /usr/local/sbin \
/sbin \
/bin \
-# vi keybindings
-bindkey -v
+# emacs keybindings
+bindkey -e
# fix keys in st
bindkey "^[[P" delete-char
bindkey "^[[H" beginning-of-line
bindkey "^[[4~" end-of-line
-# line movement
-bindkey '^A' beginning-of-line
-bindkey '^E' end-of-line
-
-# bash-like search
-bindkey '^R' history-incremental-pattern-search-backward
+# plan9 like completion
+bindkey "^F" complete-word
# up / down arrow search
autoload -U up-line-or-beginning-search