man/man.plugin.zsh

13 lines
273 B
Bash
Raw Normal View History

man-command-line() {
2018-06-25 20:08:43 +00:00
[[ -z $BUFFER ]] && zle up-history
if [[ $BUFFER == man\ * ]]; then
LBUFFER="${LBUFFER#man }"
else
LBUFFER="man $LBUFFER"
fi
}
zle -N man-command-line
2018-06-25 20:08:43 +00:00
# Defined shortcut keys: [F1][F1]
bindkey "OPOP" man-command-line