From d3cd648bb6a25c150a1569eb917068c0c459f50f Mon Sep 17 00:00:00 2001 From: Lukas Sabota Date: Tue, 10 Dec 2019 15:10:36 -0500 Subject: [PATCH] add urlscan compatibility --- README.md | 3 +++ urlview.tmux | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 76aa8d2..bcfb36d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +# prg318 fork information +This fork adds compatibility for urlscan to the tmux urlview plugin + # Tmux urlview Quickly open any url on your terminal window! diff --git a/urlview.tmux b/urlview.tmux index 88752ce..55df93e 100755 --- a/urlview.tmux +++ b/urlview.tmux @@ -16,6 +16,8 @@ find_executable() { echo "urlview" elif type extract_url >/dev/null 2>&1; then echo "extract_url" + elif type urlscan >/dev/null 2>&1; then + echo "urlscan" fi } @@ -23,7 +25,7 @@ readonly key="$(get_tmux_option "@urlview-key" "u")" readonly cmd="$(find_executable)" if [ -z "$cmd" ]; then - tmux display-message "Failed to load tmux-urlview: neither urlview nor extract_url were found on the PATH" + tmux display-message "Failed to load tmux-urlview: neither urlview, urlscan, nor extract_url were found on the PATH" else tmux bind-key "$key" capture-pane -J \\\; \ save-buffer "${TMPDIR:-/tmp}/tmux-buffer" \\\; \