From adb23c1e860d1ac9a528d6abe67c3081f6d6177b Mon Sep 17 00:00:00 2001 From: Shivam Mehta Date: Sun, 30 May 2021 05:57:14 +0530 Subject: Using entire buffer scrollback as target content --- fzf-url.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fzf-url.sh') diff --git a/fzf-url.sh b/fzf-url.sh index d3fbf77..4bd4fd8 100755 --- a/fzf-url.sh +++ b/fzf-url.sh @@ -19,7 +19,7 @@ open_url() { fi } -content="$(tmux capture-pane -J -p)" +content="$(tmux capture-pane -J -p -S -"$2")" mapfile -t urls < <(echo "$content" |grep -oE '(https?|ftp|file):/?//[-A-Za-z0-9+&@#/%?=~_|!:,.;]*[-A-Za-z0-9+&@#/%=~_|]') mapfile -t wwws < <(echo "$content" |grep -oE 'www\.[a-zA-Z](-?[a-zA-Z0-9])+\.[a-zA-Z]{2,}(/\S+)*' |sed 's/^\(.*\)$/http:\/\/\1/') -- cgit v1.2.3