Quit on double Enter.

This commit is contained in:
Arun Prakash Jana 2016-05-24 21:39:59 +05:30
parent eb5aa0b136
commit 9af6c01fd9
No known key found for this signature in database
GPG Key ID: C0A712ED95043DCB
3 changed files with 8 additions and 3 deletions

View File

@ -174,7 +174,7 @@ Remove shell completion scripts:
prompt keys:
1-N open the Nth search result in web browser
Enter exit buku
double Enter exit buku
## Operational notes

7
buku
View File

@ -895,6 +895,11 @@ def prompt(results):
while True:
try:
nav = input("Result number to open: ")
if not nav:
nav = input("Result number to open: ")
if not nav:
# Quit on double enter
break
except EOFError:
return
@ -1235,7 +1240,7 @@ class ExtendedArgumentParser(argparse.ArgumentParser):
file.write('''
prompt keys:
1-N open the Nth search result in web browser
Enter exit buku
double Enter exit buku
Version %s
Copyright (C) 2015-2016 Arun Prakash Jana <engineerarun@gmail.com>

2
buku.1
View File

@ -157,7 +157,7 @@ Open
.I Nth
search result in browser.
.TP
.BI "Enter"
.BI "double Enter"
Exit buku.
.SH ENVIRONMENT
.TP