From e4b643fdafe757015766872c379e85ada522a844 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 14 Feb 2018 18:36:57 +0530 Subject: [PATCH] Show a nice message when no URLs are found --- kittens/url_hints/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kittens/url_hints/main.py b/kittens/url_hints/main.py index edce53510..cd6a969e1 100644 --- a/kittens/url_hints/main.py +++ b/kittens/url_hints/main.py @@ -206,6 +206,9 @@ def run(args, source_file=None): for line in text.splitlines(): marked = mark(finditer, line, index_map) lines.append(marked) + if not index_map: + input(_('No URLs found, press Enter to abort.')) + return loop = Loop() handler = URLHints(lines, index_map)