diff options
Diffstat (limited to '')
-rwxr-xr-x | giti | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -109,18 +109,19 @@ def giti(kind: str): print('Found no exact match, let\'s give searching a try...') filepath = search_for_file(kind) if not filepath: - print('Can\'t help any more, exiting') - print('No changes made') - exit(0) + terminate_gracefully() gifile = get_ignore_file(filepath, path=True) if not gifile: - print('Can\'t help any more, exiting') - print('No changes made') - exit(0) + terminate_gracefully() save_file(gifile) +def terminate_gracefully(): + print('Can\'t help any more, exiting') + print('No changes made') + exit(0) + def show_help(): print('Usage: giti [language or stuff]') |