From 3c77bf6144087662c7a9db419d31968b5e073694 Mon Sep 17 00:00:00 2001 From: Thiago Perrotta Date: Sun, 26 Dec 2021 19:18:09 -0500 Subject: display message when no URLs are matched This yields a better user experience, providing feedback on the "unhappy path". --- fzf-url.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fzf-url.sh b/fzf-url.sh index b7e72ad..c779569 100755 --- a/fzf-url.sh +++ b/fzf-url.sh @@ -49,7 +49,7 @@ items=$(printf '%s\n' "${urls[@]}" "${wwws[@]}" "${ips[@]}" "${gits[@]}" "${extr sort -u | nl -w3 -s ' ' ) -[ -z "$items" ] && exit +[ -z "$items" ] && tmux display 'tmux-fzf-url: no URLs found' && exit mapfile -t chosen < <(fzf_filter <<< "$items" | awk '{print $2}') -- cgit v1.2.3