diff options
author | Andrew Janke <andrew@apjanke.net> | 2015-09-03 13:05:24 -0400 |
---|---|---|
committer | Andrew Janke <andrew@apjanke.net> | 2015-09-03 13:05:24 -0400 |
commit | 93b4a6c02eeafb875de5d9bcccd73bdcd8265f40 (patch) | |
tree | 7cc87fcd416bf71cee77f30bf2e60cf607671f43 /plugins/man | |
parent | 689b5ab3c8c8bf30ee63cafb8401d7d95e41f359 (diff) | |
parent | 0532860c618aabc02d5dab34391b967e8e4c6272 (diff) | |
download | zsh-93b4a6c02eeafb875de5d9bcccd73bdcd8265f40.tar.gz zsh-93b4a6c02eeafb875de5d9bcccd73bdcd8265f40.tar.bz2 zsh-93b4a6c02eeafb875de5d9bcccd73bdcd8265f40.zip |
Merge branch 'master' into osx-fix-tab-for-iterm
Conflicts:
plugins/osx/osx.plugin.zsh
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 |