gazorby / fifc

🐠 Configurable fzf completions for fish shell
MIT License
150 stars 12 forks source link

Script error when pressing tab to complete #50

Open eelcocramer opened 1 week ago

eelcocramer commented 1 week ago

Describe the bug

When I use tab for auto completion an error occurs.

To Reproduce

Open a shell, press tab.

Expected behavior

The error not to occur.

Shell output

~/.config/fish/functions/_fifc_action.fish (line 29): array indices start at 1, not 0.
        if test -n "$$comp[$i][1]"
                            ^
in function '_fifc_action' with arguments 'source'
    called on line 1 of file ~/.config/fish/functions/_fifc.fish
in command substitution
    called on line 26 of file ~/.config/fish/functions/_fifc.fish
in function '_fifc'
~/.config/fish/functions/_fifc_action.fish (line 34): array indices start at 1, not 0.
        if test -n "$$comp[$i][2]"
                            ^
in function '_fifc_action' with arguments 'source'
    called on line 1 of file ~/.config/fish/functions/_fifc.fish
in command substitution
    called on line 26 of file ~/.config/fish/functions/_fifc.fish
in function '_fifc'
~/.config/fish/functions/_fifc_action.fish (line 46): array indices start at 1, not 0.
        set _fifc_extract_regex "$$comp[$i][7]"
                                         ^
in function '_fifc_action' with arguments 'source'
    called on line 1 of file ~/.config/fish/functions/_fifc.fish
in command substitution
    called on line 26 of file ~/.config/fish/functions/_fifc.fish
in function '_fifc'
~/.config/fish/functions/_fifc_action.fish (line 55): array indices start at 1, not 0.
        else if test "$action" = source; and test -n "$$comp[$i][5]"
                                                              ^
in function '_fifc_action' with arguments 'source'
    called on line 1 of file ~/.config/fish/functions/_fifc.fish
in command substitution

System (please complete the following information):

Using fish, version 3.7.1 on MacOS 15.0.1.

Additional context

I installed fifc using fisher. Error started to occur today. I'm updating the module daily using fisher update and it was working fine earlier this week.

eelcocramer commented 1 week ago

When I install the version before the latest PR the error does not occur.

I.e. fisher install gazorby/fifc@1bc301453f674ed21fac4979c65a9a4cb7f2af61

gazorby commented 1 week ago

Does it occur once or every time you try to complete?

eelcocramer commented 1 week ago

Yes

tlvenn commented 1 day ago

exactly same thing happen on my end, same fish version with osx sonoma.