diff options
author | Thiago Perrotta <tbperrotta@gmail.com> | 2021-12-26 19:18:09 -0500 |
---|---|---|
committer | Thiago Perrotta <tbperrotta@gmail.com> | 2021-12-26 19:18:11 -0500 |
commit | 3c77bf6144087662c7a9db419d31968b5e073694 (patch) | |
tree | acb6bbe8c82be7a041b940e6a47c64371bed0224 | |
parent | 3c02503dd519162eb63de5814f460046664f33c2 (diff) | |
download | fork-tmux-fzf-url-3c77bf6144087662c7a9db419d31968b5e073694.tar.gz fork-tmux-fzf-url-3c77bf6144087662c7a9db419d31968b5e073694.tar.bz2 fork-tmux-fzf-url-3c77bf6144087662c7a9db419d31968b5e073694.zip |
display message when no URLs are matched
This yields a better user experience, providing feedback on the "unhappy
path".
-rwxr-xr-x | fzf-url.sh | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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}') |