man/man.plugin.zsh

13 lines
237 B
Bash
Raw Normal View History

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