Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: run-help: Support for svn and git



On Mon, Dec 31, 2007 at 01:08:40PM -0800, Bart Schaefer wrote:
> There must be something in the /etc/z* files installed with the Debian
> zsh package that removes the alias and loads the function instead.

Right, the tail end of the global zshrc unaliases and autoloads it.
The function is also modified slightly; I'm not sure how to make it
more generic without doing a build-time replacement.

--- Functions/Misc/run-help	2007-12-17 14:52:56.000000000 -0500
+++ debian/run-help	2008-01-03 19:15:30.000000000 -0500
@@ -2,19 +2,19 @@
 #
 # 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
+# This version adapted for Debian GNU/Linux by Robert Leslie <rob@xxxxxxxx>
+# from source written by Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>,
+# and modified by Clint Adams <schizo@xxxxxxxxxx>.
 #
 
 emulate -R zsh
 setopt localoptions
 
+: ${HELPDIR:=/usr/share/zsh/help}
+
 [[ $1 == "." ]] && 1="dot"
 [[ $1 == ":" ]] && 1="colon"
 
-# Check whether Util/helpfiles has been used to generate zsh help
 if [[ $# == 0 || $1 == "-l" ]]
 then
     if [[ -n "${HELPDIR:-}" && -d $HELPDIR ]]
@@ -28,7 +28,7 @@
     return 0
 elif [[ -n "${HELPDIR:-}" && -r $HELPDIR/$1 && $1 != compctl ]]
 then
-    ${=PAGER:-more} $HELPDIR/$1
+    ${=PAGER:-/usr/bin/pager} $HELPDIR/$1
     return $?
 fi
 
@@ -61,7 +61,7 @@
 	case ${what[(w)1]} in
 	(comp*) man zshcompsys;;
 	(zf*) man zshftpsys;;
-	(*) builtin functions ${what[(w)1]} | ${=PAGER:-more};;
+	(*) builtin functions ${what[(w)1]} | ${=PAGER:-/usr/bin/pager};;
 	esac;;
     (*( is a * builtin))
 	case ${what[(w)1]} in



Messages sorted by: Reverse Date, Date, Thread, Author