summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2015-10-11 11:26:48 +0200
committerMartin Väth <martin@mvath.de>2015-10-11 11:32:18 +0200
commit109d6b4f673a249aea4deeb0cdb5b54a21592410 (patch)
treeec3589a50dac5be54ef6248d1e0ff3a9fd3b41b4 /app-shells/auto-fu-zsh
downloadmv-109d6b4f673a249aea4deeb0cdb5b54a21592410.tar.gz
mv-109d6b4f673a249aea4deeb0cdb5b54a21592410.tar.bz2
mv-109d6b4f673a249aea4deeb0cdb5b54a21592410.zip
Clear history for egencache --repo=mv --update-changelogs
Diffstat (limited to 'app-shells/auto-fu-zsh')
-rw-r--r--app-shells/auto-fu-zsh/Manifest1
-rw-r--r--app-shells/auto-fu-zsh/auto-fu-zsh-0.0.1.12-r4.ebuild129
-rw-r--r--app-shells/auto-fu-zsh/auto-fu-zsh-99999999.ebuild129
-rw-r--r--app-shells/auto-fu-zsh/files/exit.patch11
-rw-r--r--app-shells/auto-fu-zsh/files/reset-color.patch11
-rw-r--r--app-shells/auto-fu-zsh/files/zsh-compatibility.patch15
-rw-r--r--app-shells/auto-fu-zsh/metadata.xml18
7 files changed, 314 insertions, 0 deletions
diff --git a/app-shells/auto-fu-zsh/Manifest b/app-shells/auto-fu-zsh/Manifest
new file mode 100644
index 00000000..e0c1e71b
--- /dev/null
+++ b/app-shells/auto-fu-zsh/Manifest
@@ -0,0 +1 @@
+DIST auto-fu-zsh-0.0.1.12.tar.gz 9409 SHA256 cf692f8a81588289e44396f06e30e36fc6fa6bdcb2c87e4d462a15bad61db1c1 SHA512 7e5dbbb7329bfb220fe467de0eebc7d2aa2469ddea84d516deaa00d193729362f02355325765b29f16df66fbf458df69f984b70fad801b97af65a498080272ba WHIRLPOOL 10960ac344555312310170e6384e539767ce2c86a2948bf165b23b00bc282cea0f84d7a876e774df73e54a78bdc0606d4c9fc5b0cb9b41df99e2dc55f1a59bdd
diff --git a/app-shells/auto-fu-zsh/auto-fu-zsh-0.0.1.12-r4.ebuild b/app-shells/auto-fu-zsh/auto-fu-zsh-0.0.1.12-r4.ebuild
new file mode 100644
index 00000000..feb8d9bb
--- /dev/null
+++ b/app-shells/auto-fu-zsh/auto-fu-zsh-0.0.1.12-r4.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+pPN=${PN%-zsh}
+mPN="${pPN}.zsh"
+case ${PV} in
+99999999*)
+ LIVE=:
+ EGIT_REPO_URI="git://github.com/hchbaw/${mPN}.git"
+ EGIT_BRANCH="pu"
+ inherit git-r3
+ PROPERTIES="live"
+ SRC_URI=""
+ KEYWORDS="";;
+*)
+ LIVE=false
+ RESTRICT="mirror"
+ SRC_URI="https://github.com/hchbaw/${mPN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/${mPN}-${PV}"
+ KEYWORDS="~amd64 ~x86";;
+esac
+
+DESCRIPTION="zsh automatic complete-word and list-choices: incremental completion"
+HOMEPAGE="https://github.com/hchbaw/auto-fu.zsh/"
+
+LICENSE="HPND"
+SLOT="0"
+IUSE="+compile"
+
+DEPEND="compile? ( app-shells/zsh )"
+
+DESTPATH="/usr/share/zsh/site-contrib/${mPN}"
+
+generate_example() {
+ echo "# Put something like the following into your ~/.zshrc
+
+# First, we set sane options for the standard completion system:
+
+autoload -Uz compinit is-at-least
+compinit -D -u
+zstyle ':completion:*' completer _complete
+zstyle ':completion:*' list-colors \${(s.:.)LS_COLORS}
+zstyle ':completion:*' menu select=1 # interactive
+zstyle ':completion:*' accept-exact-dirs true
+zstyle ':completion:*' path-completion false
+if is-at-least 4.3.10
+then zstyle ':completion:*' format \"%B%F{yellow}%K{blue}%d%k%f%b\"
+else zstyle ':completion:*' format \"%B%d%b\"
+fi
+
+# Now we source ${PN}"
+ if use compile
+ then echo ". ${DESTPATH}/${pPN}
+auto-fu-install"
+ else echo ". ${DESTPATH}/${pPN}.zsh"
+ fi
+ echo "
+# Finally, we configure ${PN}
+
+zstyle ':auto-fu:highlight' input
+zstyle ':auto-fu:highlight' completion bold,fg=blue
+zstyle ':auto-fu:highlight' completion/one fg=blue
+zstyle ':auto-fu:var' postdisplay # \$'\\n-azfu-'
+#zstyle ':auto-fu:var' enable all
+#zstyle ':auto-fu:var' track-keymap-skip opp
+#zstyle ':auto-fu:var' disable magic-space
+zle-line-init() auto-fu-init
+zle -N zle-line-init
+zle -N zle-keymap-select auto-fu-zle-keymap-select
+
+# Starting a line with a space or tab or quoting the first word
+# or escaping a word should deactivate auto-fu for that line/word.
+# This is useful e.g. if auto-fu is too slow for you in some cases.
+zstyle ':auto-fu:var' autoable-function/skiplines '[[:blank:]\\\\\"'\'']*'
+zstyle ':auto-fu:var' autoable-function/skipwords '[\\\\]*'
+
+# Let Ctrl-d successively remove tail of line, whole line, and exit
+kill-line-maybe() {
+ if ((\$#BUFFER > CURSOR))
+ then zle kill-line
+ else zle kill-whole-line
+ fi
+}
+zle -N kill-line-maybe
+bindkey '\C-d' kill-line-maybe
+
+# Keep Ctrl-d behavior also when auto-fu is active
+afu+orf-ignoreeof-deletechar-list() {
+ afu-eof-maybe afu-ignore-eof zle kill-line-maybe
+}
+afu+orf-exit-deletechar-list() {
+ afu-eof-maybe exit zle kill-line-maybe
+}"
+}
+
+src_prepare() {
+ (
+ umask 022
+ generate_example >"${S}"/zshrc-example
+ )
+ if ! ${LIVE}
+ then
+ # Make Ctrl-D return correctly.
+ epatch "${FILESDIR}"/exit.patch
+ # Reset color with "return":
+ epatch "${FILESDIR}"/reset-color.patch
+ # Make it work with older zsh versions:
+ epatch "${FILESDIR}"/zsh-compatibility.patch
+ fi
+ epatch_user
+}
+
+src_compile() {
+ ! use compile || mPN="${mPN}" \
+ zsh -c 'setopt extendedglob no_shwordsplit
+source ${mPN}
+auto-fu-zcompile ${PWD}/${mPN} ${PWD}' || die
+}
+
+src_install() {
+ insinto "${DESTPATH}"
+ doins "${mPN}"
+ ! use compile || doins "${pPN}" "${pPN}.zwc"
+ dodoc zshrc-example README*
+}
diff --git a/app-shells/auto-fu-zsh/auto-fu-zsh-99999999.ebuild b/app-shells/auto-fu-zsh/auto-fu-zsh-99999999.ebuild
new file mode 100644
index 00000000..feb8d9bb
--- /dev/null
+++ b/app-shells/auto-fu-zsh/auto-fu-zsh-99999999.ebuild
@@ -0,0 +1,129 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils
+
+pPN=${PN%-zsh}
+mPN="${pPN}.zsh"
+case ${PV} in
+99999999*)
+ LIVE=:
+ EGIT_REPO_URI="git://github.com/hchbaw/${mPN}.git"
+ EGIT_BRANCH="pu"
+ inherit git-r3
+ PROPERTIES="live"
+ SRC_URI=""
+ KEYWORDS="";;
+*)
+ LIVE=false
+ RESTRICT="mirror"
+ SRC_URI="https://github.com/hchbaw/${mPN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+ S="${WORKDIR}/${mPN}-${PV}"
+ KEYWORDS="~amd64 ~x86";;
+esac
+
+DESCRIPTION="zsh automatic complete-word and list-choices: incremental completion"
+HOMEPAGE="https://github.com/hchbaw/auto-fu.zsh/"
+
+LICENSE="HPND"
+SLOT="0"
+IUSE="+compile"
+
+DEPEND="compile? ( app-shells/zsh )"
+
+DESTPATH="/usr/share/zsh/site-contrib/${mPN}"
+
+generate_example() {
+ echo "# Put something like the following into your ~/.zshrc
+
+# First, we set sane options for the standard completion system:
+
+autoload -Uz compinit is-at-least
+compinit -D -u
+zstyle ':completion:*' completer _complete
+zstyle ':completion:*' list-colors \${(s.:.)LS_COLORS}
+zstyle ':completion:*' menu select=1 # interactive
+zstyle ':completion:*' accept-exact-dirs true
+zstyle ':completion:*' path-completion false
+if is-at-least 4.3.10
+then zstyle ':completion:*' format \"%B%F{yellow}%K{blue}%d%k%f%b\"
+else zstyle ':completion:*' format \"%B%d%b\"
+fi
+
+# Now we source ${PN}"
+ if use compile
+ then echo ". ${DESTPATH}/${pPN}
+auto-fu-install"
+ else echo ". ${DESTPATH}/${pPN}.zsh"
+ fi
+ echo "
+# Finally, we configure ${PN}
+
+zstyle ':auto-fu:highlight' input
+zstyle ':auto-fu:highlight' completion bold,fg=blue
+zstyle ':auto-fu:highlight' completion/one fg=blue
+zstyle ':auto-fu:var' postdisplay # \$'\\n-azfu-'
+#zstyle ':auto-fu:var' enable all
+#zstyle ':auto-fu:var' track-keymap-skip opp
+#zstyle ':auto-fu:var' disable magic-space
+zle-line-init() auto-fu-init
+zle -N zle-line-init
+zle -N zle-keymap-select auto-fu-zle-keymap-select
+
+# Starting a line with a space or tab or quoting the first word
+# or escaping a word should deactivate auto-fu for that line/word.
+# This is useful e.g. if auto-fu is too slow for you in some cases.
+zstyle ':auto-fu:var' autoable-function/skiplines '[[:blank:]\\\\\"'\'']*'
+zstyle ':auto-fu:var' autoable-function/skipwords '[\\\\]*'
+
+# Let Ctrl-d successively remove tail of line, whole line, and exit
+kill-line-maybe() {
+ if ((\$#BUFFER > CURSOR))
+ then zle kill-line
+ else zle kill-whole-line
+ fi
+}
+zle -N kill-line-maybe
+bindkey '\C-d' kill-line-maybe
+
+# Keep Ctrl-d behavior also when auto-fu is active
+afu+orf-ignoreeof-deletechar-list() {
+ afu-eof-maybe afu-ignore-eof zle kill-line-maybe
+}
+afu+orf-exit-deletechar-list() {
+ afu-eof-maybe exit zle kill-line-maybe
+}"
+}
+
+src_prepare() {
+ (
+ umask 022
+ generate_example >"${S}"/zshrc-example
+ )
+ if ! ${LIVE}
+ then
+ # Make Ctrl-D return correctly.
+ epatch "${FILESDIR}"/exit.patch
+ # Reset color with "return":
+ epatch "${FILESDIR}"/reset-color.patch
+ # Make it work with older zsh versions:
+ epatch "${FILESDIR}"/zsh-compatibility.patch
+ fi
+ epatch_user
+}
+
+src_compile() {
+ ! use compile || mPN="${mPN}" \
+ zsh -c 'setopt extendedglob no_shwordsplit
+source ${mPN}
+auto-fu-zcompile ${PWD}/${mPN} ${PWD}' || die
+}
+
+src_install() {
+ insinto "${DESTPATH}"
+ doins "${mPN}"
+ ! use compile || doins "${pPN}" "${pPN}.zwc"
+ dodoc zshrc-example README*
+}
diff --git a/app-shells/auto-fu-zsh/files/exit.patch b/app-shells/auto-fu-zsh/files/exit.patch
new file mode 100644
index 00000000..a916f37f
--- /dev/null
+++ b/app-shells/auto-fu-zsh/files/exit.patch
@@ -0,0 +1,11 @@
+--- 1/auto-fu.zsh
++++ 1/auto-fu.zsh
+@@ -287,7 +287,7 @@
+
+ afu-eof-maybe () {
+ local eof="$1"; shift
+- [[ "$BUFFER" != '' ]] || { $eof; return }
++ [[ -z $BUFFER ]] && { $eof; return }
+ "$@"
+ }
+
diff --git a/app-shells/auto-fu-zsh/files/reset-color.patch b/app-shells/auto-fu-zsh/files/reset-color.patch
new file mode 100644
index 00000000..12b5265b
--- /dev/null
+++ b/app-shells/auto-fu-zsh/files/reset-color.patch
@@ -0,0 +1,11 @@
+--- 1/auto-fu.zsh
++++ 1/auto-fu.zsh
+@@ -370,7 +370,7 @@
+ [[ -z ${hi} ]] || region_highlight=("0 ${#BUFFER} ${hi}")
+ }
+ zstyle -T ':auto-fu:var' postdisplay/clearp && POSTDISPLAY=''
+- return 0
++ echo -en '\e[0m'
+ }
+ zle -N $afufun
+ EOT
diff --git a/app-shells/auto-fu-zsh/files/zsh-compatibility.patch b/app-shells/auto-fu-zsh/files/zsh-compatibility.patch
new file mode 100644
index 00000000..1c2d546c
--- /dev/null
+++ b/app-shells/auto-fu-zsh/files/zsh-compatibility.patch
@@ -0,0 +1,15 @@
+--- 1/auto-fu.zsh
++++ 1/auto-fu.zsh
+@@ -305,7 +305,11 @@
+ afu+vi-ins-mode () { zle -K afu ; }; zle -N afu+vi-ins-mode
+ afu+vi-cmd-mode () { zle -K afu-vicmd; }; zle -N afu+vi-cmd-mode
+
+-auto-fu-zle-keymap-select () { afu-track-keymap "$@" afu-adjust-main-keymap }
++# Some zsh versions omit the first argument:
++auto-fu-zle-keymap-select() {
++[[ $# -ge 2 ]] || set -- zle-keymap-select "${@}"
++afu-track-keymap "${@}" afu-adjust-main-keymap
++}
+
+ afu-adjust-main-keymap () { [[ "$KEYMAP" == 'main' ]] && { zle -K "$1" } }
+
diff --git a/app-shells/auto-fu-zsh/metadata.xml b/app-shells/auto-fu-zsh/metadata.xml
new file mode 100644
index 00000000..1576938b
--- /dev/null
+++ b/app-shells/auto-fu-zsh/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>martin@mvath.de</email>
+ <name>Martin Väth</name>
+ </maintainer>
+ <upstream>
+ <maintainer>
+ <email>takebi@laafc.net</email>
+ <name>Takeshi Banse</name>
+ </maintainer>
+ <remote-id type="github">hchbaw/auto-fu.zsh</remote-id>
+ </upstream>
+ <use>
+ <flag name="compile">Byte-compile to speed up. Do not use this if you are cross-compiling</flag>
+ </use>
+</pkgmetadata>