summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2022-08-08 13:39:37 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2022-08-08 23:50:47 +0900
commit19f9bbca0d5ae1f64682ab52209c95e38351ece6 (patch)
treea0fcc86cb2c0e032b4ec2c7da3b9c1617b8d6e92 /bin
parent779d8e16273a9ca776bef4136b3ff1886e10d19a (diff)
Allow specifying fzf options in $FZF_TMUX_OPTS without '--'
Diffstat (limited to 'bin')
-rwxr-xr-xbin/fzf-tmux7
1 files changed, 2 insertions, 5 deletions
diff --git a/bin/fzf-tmux b/bin/fzf-tmux
index ff1df5ef..e461fd77 100755
--- a/bin/fzf-tmux
+++ b/bin/fzf-tmux
@@ -10,7 +10,6 @@ fail() {
fzf="$(command -v fzf 2> /dev/null)" || fzf="$(dirname "$0")/fzf"
[[ -x "$fzf" ]] || fail 'fzf executable not found'
-tmux_args=()
args=()
opt=""
skip=""
@@ -119,8 +118,6 @@ while [[ $# -gt 0 ]]; do
# "--" can be used to separate fzf-tmux options from fzf options to
# avoid conflicts
skip=1
- tmux_args=("${args[@]}")
- args=()
continue
;;
*)
@@ -212,7 +209,7 @@ if [[ "$opt" =~ "-E" ]]; then
cat <&0 > $fifo1 &
fi
- tmux popup -d "$PWD" "${tmux_args[@]}" $opt "bash $argsf" > /dev/null 2>&1
+ tmux popup -d "$PWD" $opt "bash $argsf" > /dev/null 2>&1
exit $?
fi
@@ -226,7 +223,7 @@ else
fi
tmux set-window-option synchronize-panes off \;\
set-window-option remain-on-exit off \;\
- split-window -c "$PWD" $opt "${tmux_args[@]}" "bash -c 'exec -a fzf bash $argsf'" $swap \
+ split-window -c "$PWD" $opt "bash -c 'exec -a fzf bash $argsf'" $swap \
> /dev/null 2>&1 || { "$fzf" "${args[@]}"; exit $?; }
cat $fifo2
exit "$(cat $fifo3)"