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
# 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 {{{