From 918a78cfdb92b9301168cb9d62d8ddbbdfd907f6 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Sun, 16 Sep 2018 20:16:16 +0200 Subject: man: rename file to *.plugin.zsh (#6016) Also fixed minor typo Closes #6108 Co-authored-by: Matt --- plugins/man/man.plugin.zsh | 27 +++++++++++++++++++++++++++ plugins/man/man.zsh | 27 --------------------------- 2 files changed, 27 insertions(+), 27 deletions(-) create mode 100644 plugins/man/man.plugin.zsh delete mode 100644 plugins/man/man.zsh (limited to 'plugins/man') diff --git a/plugins/man/man.plugin.zsh b/plugins/man/man.plugin.zsh new file mode 100644 index 000000000..94aa4918d --- /dev/null +++ b/plugins/man/man.plugin.zsh @@ -0,0 +1,27 @@ +# ------------------------------------------------------------------------------ +# Author +# ------ +# +# * Jerry Ling +# +# ------------------------------------------------------------------------------ +# Usage +# ----- +# +# 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 diff --git a/plugins/man/man.zsh b/plugins/man/man.zsh deleted file mode 100644 index 3490b0b61..000000000 --- a/plugins/man/man.zsh +++ /dev/null @@ -1,27 +0,0 @@ -# ------------------------------------------------------------------------------ -# Author -# ------ -# -# * Jerry Ling -# -# ------------------------------------------------------------------------------ -# 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 -- cgit v1.2.3-70-g09d2