FIX: use non-colliding function name

fixes `_man:3: read-only variable: LBUFFER`
This commit is contained in:
Sebastian Mark 2018-07-13 11:29:43 +02:00
parent d143e0f756
commit 535b0b8d08

View file

@ -1,4 +1,4 @@
_man() {
man-command-line() {
[[ -z $BUFFER ]] && zle up-history
if [[ $BUFFER == man\ * ]]; then
LBUFFER="${LBUFFER#man }"
@ -6,7 +6,7 @@ _man() {
LBUFFER="man $LBUFFER"
fi
}
zle -N _man
zle -N man-command-line
# Defined shortcut keys: [F1][F1]
bindkey "OPOP" _man
bindkey "OPOP" man-command-line