diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2015-03-08 16:36:37 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2015-03-08 16:36:37 +0900 |
commit | 62a28468a75d5136dd09560716829b8164d9a985 (patch) | |
tree | af1a0502198c3b21fe5bbfc861c5fa15a8ad2b37 /bin | |
parent | 23dba99eda58ddae147a2e907513fd0471c2014d (diff) |
[fzf-tmux] Fix `--`
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/fzf-tmux | 8 |
1 files changed, 7 insertions, 1 deletions
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") |