mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
add an exit status to the autojump main script
This commit is contained in:
parent
006dd5cbec
commit
1bf91d1b25
8
autojump
8
autojump
@ -27,7 +27,7 @@ except ImportError:
|
|||||||
import pickle
|
import pickle
|
||||||
|
|
||||||
import getopt
|
import getopt
|
||||||
from sys import argv, stderr, version_info
|
from sys import argv, stderr, version_info, exit
|
||||||
from tempfile import NamedTemporaryFile
|
from tempfile import NamedTemporaryFile
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
import os
|
import os
|
||||||
@ -224,7 +224,11 @@ def shell_utility():
|
|||||||
COMPLETION_SEPARATOR, n+1, COMPLETION_SEPARATOR, r)
|
COMPLETION_SEPARATOR, n+1, COMPLETION_SEPARATOR, r)
|
||||||
for n, r in enumerate(results[:8]))))
|
for n, r in enumerate(results[:8]))))
|
||||||
elif results: print(quotes+results[0]+quotes)
|
elif results: print(quotes+results[0]+quotes)
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
shell_utility()
|
success=shell_utility()
|
||||||
|
if not success: exit(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user