]> src.twobees.de Git - dotfiles.git/blobdiff - stow/oh-my-zsh/.oh-my-zsh/plugins/man/man.plugin.zsh
rm oh-my-zsh
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / man / man.plugin.zsh
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 (file)
index dcba613..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# ------------------------------------------------------------------------------
-# Author
-# ------
-#
-# * Jerry Ling<jerryling315@gmail.com>
-#
-# ------------------------------------------------------------------------------
-# 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