aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Häggqvist <[email protected]>2015-12-09 23:12:33 +0100
committerVictor Häggqvist <[email protected]>2015-12-09 23:12:33 +0100
commit391c12ca021cdfbed50d449bc20ada68fd59493c (patch)
tree2715acb5b373452f0b066540badc3073ab4612ed
parent7cc18f8ca8020cb7dbf9aac46b35d07594314ae3 (diff)
default to first choice in search
-rwxr-xr-xgiti6
1 files changed, 5 insertions, 1 deletions
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: