summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2013-01-13 20:47:51 +0100
committerMartin Väth <martin@mvath.de>2015-10-11 10:48:35 +0200
commit26a8e10817d07572d2ab8279ef819a7669cb6637 (patch)
tree830fcfb1cad1166e26589dfb7ede6ad72da224f7
parentBump zshrc-mv (diff)
downloadmv-26a8e10817d07572d2ab8279ef819a7669cb6637.tar.gz
mv-26a8e10817d07572d2ab8279ef819a7669cb6637.tar.bz2
mv-26a8e10817d07572d2ab8279ef819a7669cb6637.zip
zsh: Add run-help completion. Fix run-help generation by fixing width
-rw-r--r--app-shells/zsh/ChangeLog7
-rw-r--r--app-shells/zsh/files/_run-help6
-rw-r--r--app-shells/zsh/zsh-5.0.2-r1.ebuild (renamed from app-shells/zsh/zsh-5.0.2.ebuild)11
3 files changed, 19 insertions, 5 deletions
diff --git a/app-shells/zsh/ChangeLog b/app-shells/zsh/ChangeLog
index f638287d..edd2ac06 100644
--- a/app-shells/zsh/ChangeLog
+++ b/app-shells/zsh/ChangeLog
@@ -1,7 +1,12 @@
# ChangeLog for app-shells/zsh
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*zsh-5.0.2-r1 (13 Jan 2013)
+
+ 13 Jan 2012; Martin Väth <martin@mvath.de>
+ Fix run-help generation by forcing width 80. Install run-help completion.
+
*zsh-5.0.2 (25 Dec 2012)
25 Dec 2012; Martin Väth <martin@mvath.de>
diff --git a/app-shells/zsh/files/_run-help b/app-shells/zsh/files/_run-help
new file mode 100644
index 00000000..fa18615b
--- /dev/null
+++ b/app-shells/zsh/files/_run-help
@@ -0,0 +1,6 @@
+#compdef run-help
+local d expl
+[[ -d $HELPDIR ]] && {
+ d=($HELPDIR/*(:t))
+ (($#d)) && _wanted commands expl 'command' compadd -a d
+} || _man
diff --git a/app-shells/zsh/zsh-5.0.2.ebuild b/app-shells/zsh/zsh-5.0.2-r1.ebuild
index 3269d625..594ffe0c 100644
--- a/app-shells/zsh/zsh-5.0.2.ebuild
+++ b/app-shells/zsh/zsh-5.0.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
@@ -71,13 +71,15 @@ PDEPEND="
"
src_prepare() {
- local i f
+ local i
# fix zshall problem with soelim
ln -s Doc man1
mv Doc/zshall.1 Doc/zshall.1.soelim
soelim Doc/zshall.1.soelim > Doc/zshall.1
epatch "${FILESDIR}/${PN}"-init.d-gentoo-r1.diff
+ cp -- "${FILESDIR}/_run-help" "${S}/Completion/Zsh/Command/_run-help" || \
+ die "cannot copy _run-help completion"
cp "${FILESDIR}"/zprofile-1 "${T}"/zprofile || die
eprefixify "${T}"/zprofile || die
@@ -160,9 +162,10 @@ generate_run_help() (
# Hence, we also need not declare any variables as local
mkdir run-help && cd run-help || die "cannot create run-help directory"
# We need GROFF_NO_SGR to produce "classical" formatting:
- export GROFF_NO_SGR=''
+ export GROFF_NO_SGR=
+ export MANWIDTH=80
export LANG=C
- unset MANPL LC_ALL
+ unset MANPL MANROFFSEQ LC_ALL
[ -z "${LC_CTYPE}" ] && export LC_CTYPE=en_US.utf8
ebegin "Generating files for run-help"
# It is necessary to be paranoid about the success of the following pipe,