diff --git a/srcpkgs/fzf/files/fzf-cd-widget b/srcpkgs/fzf/files/fzf-cd-widget index fc95584450a..6c13b1c401a 100644 --- a/srcpkgs/fzf/files/fzf-cd-widget +++ b/srcpkgs/fzf/files/fzf-cd-widget @@ -2,6 +2,6 @@ __fzfcmd() { [ ${FZF_TMUX:-1} -eq 1 ] && echo "fzf-tmux -d${FZF_TMUX_HEIGHT:-40%}" || echo "fzf" } -cd "${$(command find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \ +cd "${$(command \find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune \ -o -type d -print 2> /dev/null | sed 1d | cut -b3- | $(__fzfcmd) +m):-.}" zle reset-prompt diff --git a/srcpkgs/fzf/files/fzf-history-widget b/srcpkgs/fzf/files/fzf-history-widget index 696ac05f576..f106cf03ef9 100644 --- a/srcpkgs/fzf/files/fzf-history-widget +++ b/srcpkgs/fzf/files/fzf-history-widget @@ -3,16 +3,10 @@ __fzfcmd() { } local selected restore_no_bang_hist -if selected=$(fc -l 1 | $(__fzfcmd) +s --tac +m -n2..,.. --tiebreak=index --toggle-sort=ctrl-r -q "$LBUFFER"); then - num=$(echo "$selected" | head -n1 | awk '{print $1}' | sed 's/[^0-9]//g') +if selected=( $(fc -l 1 | $(__fzfcmd) +s --tac +m -n2..,.. --tiebreak=index --toggle-sort=ctrl-r -q "$LBUFFER") ); then + num=$selected[1] if [ -n "$num" ]; then - LBUFFER=!$num - if setopt | grep nobanghist > /dev/null; then - restore_no_bang_hist=1 - unsetopt no_bang_hist - fi - zle expand-history - [ -n "$restore_no_bang_hist" ] && setopt no_bang_hist + zle vi-fetch-history -n $num fi fi zle redisplay diff --git a/srcpkgs/fzf/patches/0001-Portable-implementation-of-swapOutput.patch b/srcpkgs/fzf/patches/0001-Portable-implementation-of-swapOutput.patch deleted file mode 100644 index 9caa25883c9..00000000000 --- a/srcpkgs/fzf/patches/0001-Portable-implementation-of-swapOutput.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 5073ddcd87868dfbaab7a8b2f2eff4cb509662a9 Mon Sep 17 00:00:00 2001 -From: Dominik Honnef -Date: Sat, 6 Jun 2015 23:25:03 +0200 -Subject: [PATCH] Portable implementation of swapOutput - -Assigning to stdin, stdout and stderr is not portable. They're specified -to be macros, and for example musl will not allow such code to be -compiled. - -Use dup2 instead. ---- - src/curses/curses.go | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/src/curses/curses.go b/src/curses/curses.go -index 985dd87..1cfc2c9 100644 ---- src/curses/curses.go -+++ src/curses/curses.go -@@ -1,13 +1,14 @@ - package curses - - /* -+#include - #include - #include - #cgo LDFLAGS: -lncurses - void swapOutput() { -- FILE* temp = stdout; -- stdout = stderr; -- stderr = temp; -+ dup2(2, 3); -+ dup2(1, 2); -+ dup2(3, 1); - } - */ - import "C" --- -2.3.6 - diff --git a/srcpkgs/fzf/template b/srcpkgs/fzf/template index dc50b7a39f8..a8bc9696b5e 100644 --- a/srcpkgs/fzf/template +++ b/srcpkgs/fzf/template @@ -1,6 +1,6 @@ # Template file for 'fzf' pkgname=fzf -version=0.9.13 +version=0.10.0 revision=2 _version=${version} wrksrc=${pkgname}-${_version} @@ -14,7 +14,7 @@ license="MIT" homepage="https://github.com/junegunn/fzf" short_desc="A command-line fuzzy finder" distfiles="https://github.com/junegunn/fzf/archive/${_version}.tar.gz" -checksum=0a9972482f57dddf0d7c72e21d13d664ad9b8ee0535bdaab60bb0db3f0ca14c3 +checksum=7d0b3ced40c99934590e3b0a2302a79ca13f36b7558d1643a89b1800021252ee # Needs cgo to build, which doesn't work when cross-compiling. nocross=yes @@ -39,4 +39,5 @@ post_install() { vinstall ${FILESDIR}/key-bindings.zsh 644 usr/share/doc/fzf vinstall shell/key-bindings.bash 644 usr/share/doc/fzf vinstall shell/key-bindings.fish 644 usr/share/doc/fzf + vinstall shell/completion.zsh 644 usr/share/doc/fzf }