gazorby / fifc

🐠 Configurable fzf completions for fish shell
MIT License
157 stars 11 forks source link

exec: Failed to execute process '(null)': An argument exceeds the OS argument length limit. #6

Closed jose1711 closed 2 years ago

jose1711 commented 2 years ago

Describe the bug Receiving an error when using to complete pacman -S arguments.

To Reproduce

Expected behavior Package name(s) should appear

Actual behavior

pacman -S exec: Failed to execute process '(null)': An argument exceeds the OS argument length limit.                                     
exec: Failed to execute process '(null)': An argument exceeds the OS argument length limit.
exec: Failed to execute process '(null)': An argument exceeds the OS argument length limit.
exec: Failed to execute process '(null)': An argument exceeds the OS argument length limit.
exec: Failed to execute process '(null)': An argument exceeds the OS argument length limit.
exec: Failed to execute process '(null)': An argument exceeds the OS argument length limit.
exec: Failed to execute process '(null)': An argument exceeds the OS argument length limit.

System (please complete the following information):

Additional context If I specify a more narrow search, like pacman -S firef no error appears - instead a list of packages starting with firef are shown.

gazorby commented 2 years ago

Hi @jose1711!

This seems related to #3. It's due to the fact that when completion is triggered, we run complete -C first, to determine the suggestion group and store the results in a list, which can leads to big OS argument size.

4 was a quick fix, only solving the special case of empty commandline, which is likely to produce large number of results, but we need a more robust solution.