For me, this isn't worth forking and making a pull request. Here are my minor changes to to your nice script, basically to just clean up after itself. Also, it removes some repetitive bash-shms, and uses the canonical method for creating a temp file.
readonly key="$(get_tmux_option "@urlview-key" "u")"
readonly cmd="$(find_executable)"
readonly temp_file="$(mktemp --tmpdir tmux-urlview.XXX)"
if [ -z "$cmd" ]; then
tmux display-message "Failed to load tmux-urlview: neither urlview nor extract_url were found on the PATH"
else
tmux bind-key "$key" capture-pane -J \\\; \
save-buffer "$temp_file" \\\; \
delete-buffer \\\; \
split-window -l 10 "$cmd '$temp_file'; rm '$temp_file' "
fi
For me, this isn't worth forking and making a pull request. Here are my minor changes to to your nice script, basically to just clean up after itself. Also, it removes some repetitive bash-shms, and uses the canonical method for creating a temp file.