From 391c12ca021cdfbed50d449bc20ada68fd59493c Mon Sep 17 00:00:00 2001 From: Victor Häggqvist Date: Wed, 9 Dec 2015 23:12:33 +0100 Subject: default to first choice in search --- giti | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/giti b/giti index 4023c07..ec34bdf 100755 --- a/giti +++ b/giti @@ -60,7 +60,11 @@ def search_for_file(kind: str) -> str: print('[%s] %s' % (i, name)) try: - choice = int(input('Enter index: ')) + choice = input('Enter index [0]: ') + if choice == "": + choice = 0 + else: + choice = int(choice) except TypeError: return None except KeyboardInterrupt: -- cgit v1.2.3