From 9af6c01fd98c9904196605927bb0f94497e3e53d Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Tue, 24 May 2016 21:39:59 +0530 Subject: [PATCH] Quit on double Enter. --- README.md | 2 +- buku | 7 ++++++- buku.1 | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a831049..c858042 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/buku b/buku index 8834c7b..eb4d149 100755 --- a/buku +++ b/buku @@ -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 diff --git a/buku.1 b/buku.1 index 880c5d6..0d73506 100644 --- a/buku.1 +++ b/buku.1 @@ -157,7 +157,7 @@ Open .I Nth search result in browser. .TP -.BI "Enter" +.BI "double Enter" Exit buku. .SH ENVIRONMENT .TP