Merge pull request #62 from csllbr/master
add option to open (a)ll search results
This commit is contained in:
commit
d4f2211a25
11
buku
11
buku
@ -1260,9 +1260,9 @@ def prompt(results, noninteractive=False, delete=False):
|
|||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
nav = input('Result number or range (x-y) to open: ')
|
nav = input('Result number or range (x-y,(a)ll) to open: ')
|
||||||
if not nav:
|
if not nav:
|
||||||
nav = input('Result number or range (x-y) to open: ')
|
nav = input('Result number or range (x-y,(a)ll) to open: ')
|
||||||
if not nav:
|
if not nav:
|
||||||
# Quit on double enter
|
# Quit on double enter
|
||||||
break
|
break
|
||||||
@ -1280,6 +1280,13 @@ def prompt(results, noninteractive=False, delete=False):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
_, _, linenumber, func, _, _ = inspect.stack()[0]
|
_, _, linenumber, func, _, _ = inspect.stack()[0]
|
||||||
logger.error('%s(), ln %d: %s', func, linenumber, e)
|
logger.error('%s(), ln %d: %s', func, linenumber, e)
|
||||||
|
elif nav == "a":
|
||||||
|
for index in range(0,count):
|
||||||
|
try:
|
||||||
|
browser_open(unquote(results[index][1]))
|
||||||
|
except Exception as e:
|
||||||
|
_, _, linenumber, func, _, _ = inspect.stack()[0]
|
||||||
|
logger.error('%s(), ln %d: %s', func, linenumber, e)
|
||||||
elif "-" in nav and is_int(nav.split("-")[0]) and is_int(nav.split("-")[1]):
|
elif "-" in nav and is_int(nav.split("-")[0]) and is_int(nav.split("-")[1]):
|
||||||
lower = int(nav.split("-")[0])
|
lower = int(nav.split("-")[0])
|
||||||
upper = int(nav.split("-")[1])
|
upper = int(nav.split("-")[1])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user