From 30b9708654c5588183fb0275dde9647a27099c82 Mon Sep 17 00:00:00 2001 From: William Ting Date: Wed, 18 Dec 2013 15:52:43 -0600 Subject: [PATCH] EFAP --- bin/autojump | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bin/autojump b/bin/autojump index 5306008..5a737fe 100755 --- a/bin/autojump +++ b/bin/autojump @@ -359,11 +359,10 @@ def main(): elif is_tab_partial_match(needle, TAB_SEPARATOR): print("tab_partial_match") else: - result = first(find_matches(entries, needles)) - - if result: - print(encode_local(surround_quotes(result.path))) - else: + try: + print(encode_local(surround_quotes( + first(find_matches(entries, needles)).path))) + except AttributeError: # always return something so the calling shell function has an # argument to `cd` to print(encode_local('.'))