about summary refs log tree commit diff
path: root/Functions/run-help
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-08-12 22:59:04 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-08-12 22:59:04 +0000
commit8d1b4b1358db02d6c9426e4bb3553583e11bf112 (patch)
treea3095364536d55f8356ac99559e440cc91f33eb1 /Functions/run-help
parent5714953c514a5fea35dcd819caf1afef4d92a13b (diff)
downloadzsh-8d1b4b1358db02d6c9426e4bb3553583e11bf112.tar.gz
zsh-8d1b4b1358db02d6c9426e4bb3553583e11bf112.tar.xz
zsh-8d1b4b1358db02d6c9426e4bb3553583e11bf112.zip
Sync up with zsh-3_1_6-pws-1.
Diffstat (limited to 'Functions/run-help')
-rwxr-xr-xFunctions/run-help72
1 files changed, 0 insertions, 72 deletions
diff --git a/Functions/run-help b/Functions/run-help
deleted file mode 100755
index a8109e3ea..000000000
--- a/Functions/run-help
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/local/bin/zsh
-#
-# Figure out where to get the best help, and get it.
-#
-# Install this function by placing it in your FPATH and then
-# adding to your .zshrc the lines:
-#	unalias run-help
-#	autoload run-help
-#
-
-emulate -R zsh
-setopt localoptions
-
-# Check whether Util/helpfiles has been used to generate zsh help
-if [[ $1 == "-l" ]]
-then
-    if [[ -n "${HELPDIR:-}" ]]
-    then
-	echo 'Here is a list of topics for which help is available:'
-	echo ""
-	print -rc $HELPDIR/*(:t)
-    else
-	echo 'There is no list of help topics available at this time'
-    fi
-    return 0
-elif [[ -n "${HELPDIR:-}" && -r $HELPDIR/$1 && $1 != compctl ]]
-then
-    ${=PAGER:-more} $HELPDIR/$1
-    return $?
-fi
-
-# No zsh help, use "whence" to figure out where else we might look
-local what places newline='
-'
-integer i=0 didman=0
-
-places=( "${(@f)$(builtin whence -va $1)}" )
-
-while ((i++ < $#places))
-do
-    what=$places[$i]
-    builtin print -r $what
-    case $what in
-    (*( is an alias)*)
-	[[ ${what[(w)6]:t} != ${what[(w)1]} ]] && run-help ${what[(w)6]:t}
-	;;
-    (*( is a * function))
-	builtin functions ${what[(w)1]} | ${=PAGER:-more}
-	;;
-    (*( is a * builtin))
-	case ${what[(w)1]} in
-	(compctl) man zshcompctl;;
-	(bindkey) man zshzle;;
-	(*setopt) man zshoptions;;
-	(*) man zshbuiltins;;
-	esac
-	;;
-    (*( is hashed to *))
-	man ${what[(w)-1]:t}
-	;;
-    (*)
-	((! didman++)) && man $1
-	;;
-    esac
-    if ((i < $#places && ! didman))
-    then
-	builtin print -nP "%SPress any key for more help or q to quit%s"
-	builtin read -k what
-	[[ $what != $newline ]] && echo
-	[[ $what == [qQ] ]] && break
-    fi
-done