X-Git-Url: https://src.twobees.de/?a=blobdiff_plain;f=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fman%2Fman.plugin.zsh;fp=stow%2Foh-my-zsh%2F.oh-my-zsh%2Fplugins%2Fman%2Fman.plugin.zsh;h=0000000000000000000000000000000000000000;hb=1a8e170bbe5c6641a26ab1ce2e6ce6c5c1faa4cd;hp=dcba613ae81f23992adb75b932bfac6f369df405;hpb=475ba35502579302593f4735c853c49ef1845dcb;p=dotfiles.git diff --git a/stow/oh-my-zsh/.oh-my-zsh/plugins/man/man.plugin.zsh b/stow/oh-my-zsh/.oh-my-zsh/plugins/man/man.plugin.zsh deleted file mode 100644 index dcba613..0000000 --- a/stow/oh-my-zsh/.oh-my-zsh/plugins/man/man.plugin.zsh +++ /dev/null @@ -1,37 +0,0 @@ -# ------------------------------------------------------------------------------ -# Author -# ------ -# -# * Jerry Ling -# -# ------------------------------------------------------------------------------ -# Usage -# ----- -# -# man will be inserted before the command -# -# ------------------------------------------------------------------------------ - -man-command-line() { - # if there is no command typed, use the last command - [[ -z "$BUFFER" ]] && zle up-history - - # if typed command begins with man, do nothing - [[ "$BUFFER" = man\ * ]] && return - - # get command and possible subcommand - # http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion-Flags - local -a args - args=(${${(Az)BUFFER}[1]} ${${(Az)BUFFER}[2]}) - - # check if man page exists for command and first argument - if man "${args[1]}-${args[2]}" >/dev/null 2>&1; then - BUFFER="man $args" - else - BUFFER="man ${args[1]}" - fi -} - -zle -N man-command-line -# Defined shortcut keys: [Esc]man -bindkey "\e"man man-command-line