From 27718318ee08014081338d52249ed2e8bf3435d4 Mon Sep 17 00:00:00 2001 From: Wenxuan Date: Fri, 6 Apr 2018 19:53:57 +0800 Subject: Support opening multi URLs at the same time --- fzf-url.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fzf-url.sh b/fzf-url.sh index 3a99788..48dcc45 100755 --- a/fzf-url.sh +++ b/fzf-url.sh @@ -6,7 +6,7 @@ #=============================================================================== fzf_cmd() { - fzf-tmux --multi --exit-0 --cycle --reverse --bind='ctrl-u:half-page-up' --bind='ctrl-d:half-page-down' --bind='ctrl-r:toggle-all' --bind='ctrl-s:toggle-sort' + fzf-tmux -d 30% --multi --exit-0 --cycle --reverse --bind='ctrl-r:toggle-all' --bind='ctrl-s:toggle-sort' } if hash xdg-open &>/dev/null; then @@ -29,5 +29,6 @@ merge "${urls[@]}" "${ips[@]}" | sort -u | nl -w3 -s ' ' | fzf_cmd | - awk '{print $2}'| xargs $open_cmd &>/dev/null || + awk '{print $2}'| + xargs -n1 -I {} $open_cmd {} &>/dev/null || true -- cgit v1.2.3