diff options
author | Tim O'Brien <timo@t413.com> | 2015-09-14 15:39:18 -0700 |
---|---|---|
committer | Tim O'Brien <timo@t413.com> | 2015-09-14 15:39:18 -0700 |
commit | e8639c700ebbf8aa416c0d14c8e3a292f1062dd7 (patch) | |
tree | 7705714541cc8781a1be7e1d2343d34e5e8aa9b1 /plugins/man/man.zsh | |
parent | 797e1f9a64c0d2775723bb28c76745b327f86d56 (diff) | |
parent | 9c08641d7c2aae0c82fa5ad91f94c67b70115ba5 (diff) | |
download | zsh-e8639c700ebbf8aa416c0d14c8e3a292f1062dd7.tar.gz zsh-e8639c700ebbf8aa416c0d14c8e3a292f1062dd7.tar.bz2 zsh-e8639c700ebbf8aa416c0d14c8e3a292f1062dd7.zip |
Update to current robbyrussell/oh-my-zsh master
Diffstat (limited to 'plugins/man/man.zsh')
-rw-r--r-- | plugins/man/man.zsh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/plugins/man/man.zsh b/plugins/man/man.zsh new file mode 100644 index 000000000..3490b0b61 --- /dev/null +++ b/plugins/man/man.zsh @@ -0,0 +1,27 @@ +# ------------------------------------------------------------------------------ +# Author +# ------ +# +# * Jerry Ling<jerryling315@gmail.com> +# +# ------------------------------------------------------------------------------ +# Usgae +# ----- +# +# man will be inserted before the command +# +# ------------------------------------------------------------------------------ + +man-command-line() { + [[ -z $BUFFER ]] && zle up-history + [[ $BUFFER != man\ * ]] && LBUFFER="man $LBUFFER" +} +zle -N man-command-line +# Defined shortcut keys: [Esc]man +bindkey "\e"man man-command-line + + +# ------------------------------------------------------------------------------ +# Also, you might want to use man-preview included in 'osx' plugin +# just substitute "man" in the function with "man-preview" after you included OS X in +# the .zshrc
\ No newline at end of file |