diff options
author | Victor Häggqvist <[email protected]> | 2015-12-09 23:12:33 +0100 |
---|---|---|
committer | Victor Häggqvist <[email protected]> | 2015-12-09 23:12:33 +0100 |
commit | 391c12ca021cdfbed50d449bc20ada68fd59493c (patch) | |
tree | 2715acb5b373452f0b066540badc3073ab4612ed | |
parent | 7cc18f8ca8020cb7dbf9aac46b35d07594314ae3 (diff) |
default to first choice in search
-rwxr-xr-x | giti | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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: |