mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
Fix incorrect handling of incomplete completion.
This commit is contained in:
parent
6360876933
commit
f9aec5f269
@ -399,8 +399,10 @@ def main(args): # noqa
|
|||||||
tab_index,
|
tab_index,
|
||||||
find_matches(entries, tab_needle)))
|
find_matches(entries, tab_needle)))
|
||||||
else:
|
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(
|
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
|
# always return a path to calling shell functions
|
||||||
['.'])))
|
['.'])))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user