Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: run-help: Support for svn and git
- X-seq: zsh-workers 24364
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Clint Adams <clint@xxxxxxx>
- Subject: Re: run-help: Support for svn and git
- Date: Sat, 05 Jan 2008 10:05:18 -0800
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <20080104043250.GB675@xxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <slrnfnfrql.cgh.joerg@xxxxxxxxxxxx> <071230200204.ZM32486@xxxxxxxxxxxxxxxxxxxxxx> <slrnfnicut.cgh.joerg@xxxxxxxxxxxx> <071231130840.ZM986@xxxxxxxxxxxxxxxxxxxxxx> <20080104001854.GA12122@xxxxxxxxxxx> <080103192134.ZM5704@xxxxxxxxxxxxxxxxxxxxxx> <20080104043250.GB675@xxxxxxxxxxx>
On Jan 3, 11:32pm, Clint Adams wrote:
} Subject: Re: run-help: Support for svn and git
}
} With this I can just
} sed 's,^# HELPDIR should be.*,: ${HELPDIR:=/usr/share/zsh/help},;s,:-more,:-/usr/bin/pager,' Functions/Misc/run-help
}
} Better ideas are welcome.
Not having a Debian install available anywhere, I'm not sure what
/usr/bin/pager does. Is there a reason you can't simply assign to
$PAGER in /etc/z* as well? With appropriate checks that it isn't
already set to something else, of course.
Then, how about this? It's not really a problem to have a default
value of HELPDIR in the function, since we check that it exists. I
suppose if someone wanted to explicitly turn OFF the use of HELPDIR,
this would be a problem ... is that worth worrying about?
Also, would /usr/share/zsh/$ZSH_VERSION/help be more appropriate?
Index: Functions/Misc/run-help
===================================================================
diff -c -r1.3 run-help
--- Functions/Misc/run-help 30 May 2007 03:36:56 -0000 1.3
+++ Functions/Misc/run-help 5 Jan 2008 17:38:35 -0000
@@ -11,13 +11,15 @@
emulate -R zsh
setopt localoptions
+local HELPDIR="${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 ]]
+ if [[ -d $HELPDIR ]]
then
echo "Here is a list of topics for which special help is available:"
echo ""
Messages sorted by:
Reverse Date,
Date,
Thread,
Author