From a2bb5e502b8931163335752e8d97fc3e66383108 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Tue, 4 Apr 2023 10:26:37 +0800 Subject: Update --- zsh/zshrc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'zsh') diff --git a/zsh/zshrc b/zsh/zshrc index d8044f1..830ff57 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -66,8 +66,8 @@ alias d='dirs -v' for index ({1..9}) alias "$index"="cd +${index}"; unset index -# create a zkbd compatible hash; -# to add other keys to this hash, see: man 5 terminfo +# Create a zkbd compatible hash +# To add other keys to this hash, see: man 5 terminfo typeset -g -A key key[Home]="${terminfo[khome]}" @@ -83,8 +83,11 @@ key[PageUp]="${terminfo[kpp]}" key[PageDown]="${terminfo[knp]}" key[Shift-Tab]="${terminfo[kcbt]}" -# setup key accordingly bindkey -- ${key[Shift-Tab]} reverse-menu-complete + +insert-first-word () { zle insert-last-word -- -1 1 } +zle -N insert-first-word +bindkey '^[,' insert-first-word #bindkey -- "\C-A" beginning-of-line #bindkey -- "\C-E" end-of-line #bindkey -- "\C-d" delete-char -- cgit v1.2.3-70-g09d2