[fzf-tmux] Escape backslash in command-line arguments

This commit is contained in:
Junegunn Choi 2016-05-15 17:07:34 +09:00
parent 9078688baf
commit faccc0a410
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -134,6 +134,7 @@ mkfifo -m o+w $fifo3
# Build arguments to fzf # Build arguments to fzf
opts="" opts=""
for arg in "${args[@]}"; do for arg in "${args[@]}"; do
arg="${arg//\\/\\\\}"
arg="${arg//\"/\\\"}" arg="${arg//\"/\\\"}"
arg="${arg//\`/\\\`}" arg="${arg//\`/\\\`}"
opts="$opts \"$arg\"" opts="$opts \"$arg\""