diff options
Diffstat (limited to 'app-shells/auto-fu-zsh')
-rw-r--r-- | app-shells/auto-fu-zsh/ChangeLog | 5 | ||||
l--------- | app-shells/auto-fu-zsh/auto-fu-zsh-0.0.1.12-r3.ebuild | 1 | ||||
l--------- | app-shells/auto-fu-zsh/auto-fu-zsh-0.0.1.12-r4.ebuild | 1 | ||||
-rw-r--r-- | app-shells/auto-fu-zsh/auto-fu-zsh-99999999-r2.ebuild (renamed from app-shells/auto-fu-zsh/auto-fu-zsh-99999999-r1.ebuild) | 41 | ||||
-rw-r--r-- | app-shells/auto-fu-zsh/files/kill-line-live.patch | 35 | ||||
-rw-r--r-- | app-shells/auto-fu-zsh/files/kill-line.patch | 35 | ||||
-rw-r--r-- | app-shells/auto-fu-zsh/metadata.xml | 1 |
7 files changed, 35 insertions, 84 deletions
diff --git a/app-shells/auto-fu-zsh/ChangeLog b/app-shells/auto-fu-zsh/ChangeLog index e8bbcd77..71292f63 100644 --- a/app-shells/auto-fu-zsh/ChangeLog +++ b/app-shells/auto-fu-zsh/ChangeLog @@ -2,6 +2,11 @@ # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*auto-fu-zsh-0.0.1.12-r4, auto-fu-zsh-99999999-r2 (26 Jan 2012) + + 26 Jan 2013; Martin Väth <martin@mvath.de> + Remove kill-line patch. Instead describe it in zshrc-example. + *auto-fu-zsh-0.0.1.12-r3, auto-fu-zsh-99999999-r1 (10 Jan 2012) 10 Jan 2013; Martin Väth <martin@mvath.de> diff --git a/app-shells/auto-fu-zsh/auto-fu-zsh-0.0.1.12-r3.ebuild b/app-shells/auto-fu-zsh/auto-fu-zsh-0.0.1.12-r3.ebuild deleted file mode 120000 index ecbfcdbe..00000000 --- a/app-shells/auto-fu-zsh/auto-fu-zsh-0.0.1.12-r3.ebuild +++ /dev/null @@ -1 +0,0 @@ -auto-fu-zsh-99999999-r1.ebuild
\ No newline at end of file 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 120000 index 00000000..85b5b98c --- /dev/null +++ b/app-shells/auto-fu-zsh/auto-fu-zsh-0.0.1.12-r4.ebuild @@ -0,0 +1 @@ +auto-fu-zsh-99999999-r2.ebuild
\ No newline at end of file diff --git a/app-shells/auto-fu-zsh/auto-fu-zsh-99999999-r1.ebuild b/app-shells/auto-fu-zsh/auto-fu-zsh-99999999-r2.ebuild index 61572f8a..daf4241d 100644 --- a/app-shells/auto-fu-zsh/auto-fu-zsh-99999999-r1.ebuild +++ b/app-shells/auto-fu-zsh/auto-fu-zsh-99999999-r2.ebuild @@ -31,7 +31,7 @@ HOMEPAGE="https://github.com/hchbaw/auto-fu.zsh/" LICENSE="HPND" SLOT="0" -IUSE="+compile +kill-line" +IUSE="+compile" DEPEND="compile? ( app-shells/zsh )" @@ -72,7 +72,31 @@ zstyle ':auto-fu:var' postdisplay # \$'\\n-azfu-' #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" +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() { @@ -80,17 +104,10 @@ src_prepare() { umask 022 generate_example >"${S}"/zshrc-example ) - if ${LIVE} - then if use kill-line - then epatch "${FILESDIR}"/kill-line-live.patch - fi - else + if ! ${LIVE} + then # Make Ctrl-D return correctly. - # In case of nonempty buffer act like kill-line or kill-whole-line. - if use kill-line - then epatch "${FILESDIR}"/kill-line.patch - else epatch "${FILESDIR}"/exit.patch - fi + epatch "${FILESDIR}"/exit.patch # Reset color with "return": epatch "${FILESDIR}"/reset-color.patch # Make it work with older zsh versions: diff --git a/app-shells/auto-fu-zsh/files/kill-line-live.patch b/app-shells/auto-fu-zsh/files/kill-line-live.patch deleted file mode 100644 index c341e898..00000000 --- a/app-shells/auto-fu-zsh/files/kill-line-live.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- auto-fu.zsh -+++ auto-fu.zsh -@@ -386,19 +386,21 @@ - } - } - --afu-eof-maybe () { -- local eof="$1"; shift -- [[ -z $BUFFER ]] && { $eof; return } -- "$@" --} -- - afu-ignore-eof () { zle -M "zsh: use 'exit' to exit." } - --afu-register-zle-eof () { -- local fun="$1" -- local then="$2" -- local else="${3:-delete-char-or-list}" -- eval "$fun () { afu-eof-maybe $then zle $else }; zle -N $fun" -+afu-kill-line() { -+if (($#BUFFER > CURSOR)) -+then zle kill-line -+else zle kill-whole-line -+fi -+} -+afu-register-zle-eof() { -+eval $1'() { [[ -z $BUFFER ]] && { '$2' -+return -+} -+afu-kill-line -+}' -+zle -N $1 - } - afu-register-zle-eof afu+orf-ignoreeof-deletechar-list afu-ignore-eof - afu-register-zle-eof afu+orf-exit-deletechar-list exit diff --git a/app-shells/auto-fu-zsh/files/kill-line.patch b/app-shells/auto-fu-zsh/files/kill-line.patch deleted file mode 100644 index cca7af05..00000000 --- a/app-shells/auto-fu-zsh/files/kill-line.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- auto-fu.zsh -+++ auto-fu.zsh -@@ -285,19 +285,21 @@ - } - } - --afu-eof-maybe () { -- local eof="$1"; shift -- [[ "$BUFFER" != '' ]] || { $eof; return } -- "$@" --} -- - afu-ignore-eof () { zle -M "zsh: use 'exit' to exit." } - --afu-register-zle-eof () { -- local fun="$1" -- local then="$2" -- local else="${3:-delete-char-or-list}" -- eval "$fun () { afu-eof-maybe $then zle $else }; zle -N $fun" -+afu-kill-line() { -+if (($#BUFFER > CURSOR)) -+then zle kill-line -+else zle kill-whole-line -+fi -+} -+afu-register-zle-eof() { -+eval $1'() { [[ -z $BUFFER ]] && { '$2' -+return -+} -+afu-kill-line -+}' -+zle -N $1 - } - afu-register-zle-eof afu+orf-ignoreeof-deletechar-list afu-ignore-eof - afu-register-zle-eof afu+orf-exit-deletechar-list exit diff --git a/app-shells/auto-fu-zsh/metadata.xml b/app-shells/auto-fu-zsh/metadata.xml index bf66b582..9c7557cb 100644 --- a/app-shells/auto-fu-zsh/metadata.xml +++ b/app-shells/auto-fu-zsh/metadata.xml @@ -14,6 +14,5 @@ </upstream> <use> <flag name="compile">Byte-compile to speed up</flag> - <flag name="kill-line">Make Ctrl-D work correctly and in case of nonempty buffer work as kill-line resp. kill-whole-line</flag> </use> </pkgmetadata> |