fifc icon indicating copy to clipboard operation
fifc copied to clipboard

Script error when pressing tab to complete

Open eelcocramer opened this issue 1 year ago • 5 comments

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 avatar Oct 18 '24 15:10 eelcocramer

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

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

eelcocramer avatar Oct 18 '24 15:10 eelcocramer

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

gazorby avatar Oct 19 '24 12:10 gazorby

Yes

eelcocramer avatar Oct 19 '24 13:10 eelcocramer

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

tlvenn avatar Oct 29 '24 16:10 tlvenn

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

For me, it happens every time I try to complete.

  • fish, version 3.7.1
  • fisher, version 4.4.5
  • macOS 14.7 (23H124)
  • Alacritty 0.14.0 (22a4475)

hrvstr avatar Nov 03 '24 10:11 hrvstr