fzf: update to 0.10.0.
This commit is contained in:
parent
622532c008
commit
038f7c028d
@ -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
|
||||
|
@ -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
|
||||
|
@ -1,39 +0,0 @@
|
||||
From 5073ddcd87868dfbaab7a8b2f2eff4cb509662a9 Mon Sep 17 00:00:00 2001
|
||||
From: Dominik Honnef <dominik@honnef.co>
|
||||
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 <unistd.h>
|
||||
#include <ncurses.h>
|
||||
#include <locale.h>
|
||||
#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
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user