From 62a28468a75d5136dd09560716829b8164d9a985 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 8 Mar 2015 16:36:37 +0900 Subject: [PATCH] [fzf-tmux] Fix `--` --- bin/fzf-tmux | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/fzf-tmux b/bin/fzf-tmux index 166c8111..f7470e03 100755 --- a/bin/fzf-tmux +++ b/bin/fzf-tmux @@ -4,10 +4,16 @@ args=() opt="" +skip="" while [ $# -gt 0 ]; do arg="$1" case "$arg" in -w*|-h*) + if [ -n "$skip" ]; then + args+=("$1") + shift + continue + fi [[ "$arg" =~ ^-w ]] && opt="-h" || opt="" if [ ${#arg} -gt 2 ]; then size="${arg:2}" @@ -26,7 +32,7 @@ while [ $# -gt 0 ]; do --) # "--" can be used to separate fzf-tmux options from fzf options to # avoid conflicts - break + skip=1 ;; *) args+=("$1")