aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWenxuan <wenxuangm@gmail.com>2018-04-06 19:53:57 +0800
committerWenxuan <wenxuangm@gmail.com>2018-04-06 19:55:04 +0800
commit27718318ee08014081338d52249ed2e8bf3435d4 (patch)
tree4946b30918ac2c6c8dd5a2e86f51566ca460de9c
parent8060fb27ab5d25bf740091de9f0e73e885370dc4 (diff)
downloadfork-tmux-fzf-url-27718318ee08014081338d52249ed2e8bf3435d4.tar.gz
fork-tmux-fzf-url-27718318ee08014081338d52249ed2e8bf3435d4.tar.bz2
fork-tmux-fzf-url-27718318ee08014081338d52249ed2e8bf3435d4.zip
Support opening multi URLs at the same time
-rwxr-xr-xfzf-url.sh5
1 files 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