wting / autojump

A cd command that learns - easily navigate directories from the command line
Other
16.06k stars 702 forks source link

possible bug when search string starts with all #669

Open schalkneethling opened 1 year ago

schalkneethling commented 1 year ago

I have been using autojump for a long time without any problems, but I ran into my first possible bug today. When I do j all press tab and then enter, I get the following error:

➜ j all__
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/autojump/22.5.3_3/libexec/bin/autojump", line 342, in <module>
    sys.exit(main(parse_arguments()))
  File "/opt/homebrew/Cellar/autojump/22.5.3_3/libexec/bin/autojump", line 326, in main
    get_ith_path(
  File "/opt/homebrew/Cellar/autojump/22.5.3_3/libexec/bin/autojump", line 324, in <lambda>
    get_ith_path = lambda i, iterable: last(take(i, iterable)).path
AttributeError: 'NoneType' object has no attribute 'path'
autojump: directory 'all__' not found

Doing something like j mech followed by tab and enter works just fine. It seems that the character combination mentioned somehow trips up autojump.

I am on macOS Ventura, using iTerm with zsh 5.8.1 (x86_64-apple-darwin22.0)