From 1bf91d1b2527c1dbc840d50e1c9aa5189ec2d6ac Mon Sep 17 00:00:00 2001 From: Joel Schaerer Date: Mon, 7 Feb 2011 22:47:22 +0100 Subject: [PATCH] add an exit status to the autojump main script --- autojump | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/autojump b/autojump index c39595c..546f247 100755 --- a/autojump +++ b/autojump @@ -27,7 +27,7 @@ except ImportError: import pickle import getopt -from sys import argv, stderr, version_info +from sys import argv, stderr, version_info, exit from tempfile import NamedTemporaryFile from operator import itemgetter import os @@ -224,7 +224,11 @@ def shell_utility(): COMPLETION_SEPARATOR, n+1, COMPLETION_SEPARATOR, r) for n, r in enumerate(results[:8])))) elif results: print(quotes+results[0]+quotes) + else: + return False + return True if __name__ == "__main__": - shell_utility() + success=shell_utility() + if not success: exit(1)