X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=23d288bc95999763d49c88ca53e4dcdca5768340;hb=d43c6d141669a70d6b74dcb77f82fdcfea8c0fdb;hp=7ca68cfac8f67a3959ed68a4cfc8ce980047813e;hpb=374a4570d22d4300d89a6a43540f50ada586aa72;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 7ca68cf..23d288b 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -116,10 +116,10 @@ check_com() { return 1 fi - if [[ -n ${commands[$1]} ]] \ - || [[ -n ${functions[$1]} ]] \ - || [[ -n ${aliases[$1]} ]] \ - || [[ -n ${reswords[$1]} ]] ; then + if [[ -n ${commands[$1]} ]] \ + || [[ -n ${functions[$1]} ]] \ + || [[ -n ${aliases[$1]} ]] \ + || [[ -n ${reswords[(r)$1]} ]] ; then return 0 fi @@ -412,6 +412,17 @@ bindkey '^Xi' insert-unicode-char # bindkey . rationalise-dot # bindkey '\eq' push-line-or-edit + +# use the vi navigation keys (hjkl) besides cursor keys in menu completion + bindkey -M menuselect 'h' vi-backward-char # left + bindkey -M menuselect 'k' vi-up-line-or-history # up + bindkey -M menuselect 'l' vi-forward-char # right + bindkey -M menuselect 'j' vi-down-line-or-history # bottom + +# accept a completion and try to complete again by using menu +# completion; very useful with completing directories +# by using 'undo' one's got a simple file browser + bindkey -M menuselect '^o' accept-and-infer-next-history # }}} # power completion - abbreviation expansion {{{