From f9aec5f269fdf99a64dc45314357b6b5ea036184 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 31 Mar 2014 16:44:21 +0100 Subject: [PATCH 1/2] Fix incorrect handling of incomplete completion. --- bin/autojump | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/autojump b/bin/autojump index 6c3dd26..4d5e194 100755 --- a/bin/autojump +++ b/bin/autojump @@ -399,8 +399,10 @@ def main(args): # noqa tab_index, find_matches(entries, tab_needle))) else: + TAB_SEPARATOR_LENGTH = len(TAB_SEPARATOR) + clean_needles = [ (needle[:-TAB_SEPARATOR_LENGTH] if needle.endswith(TAB_SEPARATOR) else needle) for needle in needles ] print_local(first(chain( - imap(attrgetter('path'), find_matches(entries, needles)), + imap(attrgetter('path'), find_matches(entries, clean_needles )), # always return a path to calling shell functions ['.']))) From 97b7e755a616f6f8e31fefd45f6bdb7134c533b3 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 31 Mar 2014 16:48:16 +0100 Subject: [PATCH 2/2] Indentation got munged, fix it. --- bin/autojump | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/autojump b/bin/autojump index 4d5e194..ee05d89 100755 --- a/bin/autojump +++ b/bin/autojump @@ -402,7 +402,7 @@ def main(args): # noqa TAB_SEPARATOR_LENGTH = len(TAB_SEPARATOR) clean_needles = [ (needle[:-TAB_SEPARATOR_LENGTH] if needle.endswith(TAB_SEPARATOR) else needle) for needle in needles ] print_local(first(chain( - imap(attrgetter('path'), find_matches(entries, clean_needles )), + imap(attrgetter('path'), find_matches(entries, clean_needles)), # always return a path to calling shell functions ['.'])))