diff options
author | Andrew Janke <andrew@apjanke.net> | 2015-09-23 18:53:05 -0400 |
---|---|---|
committer | Andrew Janke <andrew@apjanke.net> | 2015-09-23 18:53:05 -0400 |
commit | 96ff86142e9037e707f9cde8ab69e0425a0559c6 (patch) | |
tree | 217cb5e2b4a1c55afec79984c3c3c0a9efe2bf69 /plugins/man | |
parent | 502f08b5e19716d43a7ec8b006178a7b017f68cd (diff) | |
parent | 76a26a2a59d8c6d0f65a4426cdb93920e255aea7 (diff) | |
download | zsh-96ff86142e9037e707f9cde8ab69e0425a0559c6.tar.gz zsh-96ff86142e9037e707f9cde8ab69e0425a0559c6.tar.bz2 zsh-96ff86142e9037e707f9cde8ab69e0425a0559c6.zip |
Merge branch 'master' into installer-cygwin-support-3
Conflicts:
tools/install.sh
Diffstat (limited to 'plugins/man')
-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 |