mirror of
https://github.com/termux/termux-packages.git
synced 2025-02-22 22:47:51 +00:00
34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
diff -uNr fzf-0.43.0/bin/fzf-tmux fzf-0.43.0.mod/bin/fzf-tmux
|
|
--- fzf-0.43.0/bin/fzf-tmux 2023-10-15 00:56:05.000000000 +0800
|
|
+++ fzf-0.43.0.mod/bin/fzf-tmux 2023-10-15 09:53:24.427996936 +0800
|
|
@@ -1,4 +1,4 @@
|
|
-#!/usr/bin/env bash
|
|
+#!/usr/bin/bash
|
|
# fzf-tmux: starts fzf in a tmux pane
|
|
# usage: fzf-tmux [LAYOUT OPTIONS] [--] [FZF OPTIONS]
|
|
|
|
@@ -7,7 +7,7 @@
|
|
exit 2
|
|
}
|
|
|
|
-fzf="$(command which fzf)" || fzf="$(dirname "$0")/fzf"
|
|
+fzf="$(command -v fzf)" || fzf="$(dirname "$0")/fzf"
|
|
[[ -x "$fzf" ]] || fail 'fzf executable not found'
|
|
|
|
args=()
|
|
@@ -160,10 +160,10 @@
|
|
|
|
# Clean up named pipes on exit
|
|
id=$RANDOM
|
|
-argsf="${TMPDIR:-/tmp}/fzf-args-$id"
|
|
-fifo1="${TMPDIR:-/tmp}/fzf-fifo1-$id"
|
|
-fifo2="${TMPDIR:-/tmp}/fzf-fifo2-$id"
|
|
-fifo3="${TMPDIR:-/tmp}/fzf-fifo3-$id"
|
|
+argsf="${TMPDIR:-@TERMUX_PREFIX@/tmp}/fzf-args-$id"
|
|
+fifo1="${TMPDIR:-@TERMUX_PREFIX@/tmp}/fzf-fifo1-$id"
|
|
+fifo2="${TMPDIR:-@TERMUX_PREFIX@/tmp}/fzf-fifo2-$id"
|
|
+fifo3="${TMPDIR:-@TERMUX_PREFIX@/tmp}/fzf-fifo3-$id"
|
|
if tmux_win_opts=$(tmux show-options -p remain-on-exit \; show-options -p synchronize-panes 2> /dev/null); then
|
|
tmux_win_opts=( $(sed '/ off/d; s/synchronize-panes/set-option -p synchronize-panes/; s/remain-on-exit/set-option -p remain-on-exit/; s/$/ \\;/' <<< "$tmux_win_opts") )
|
|
tmux_off_opts='; set-option -p synchronize-panes off ; set-option -p remain-on-exit off'
|