Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Auto-complete very slow for make command, even using auto-complete code from master branch



On 07/07/2025 01:25, Bart Schaefer wrote:
On Sun, Jul 6, 2025 at 10:54 AM Marcos Alano <marcoshalano@xxxxxxxxx> wrote:

It seems to trigger the auto-complete but OpenWrt has a very big and
complex Makefile, with a lot of Makefiles across the repository.
[...]
Any way to debug that to find the culprit?

Typing ctl-x ? (two keystrokes) instead of TAB will invoke
_complete_debug, which writes a log file in /tmp of everything
executed.  Most likely, however, it's spending most of its time in
_make-parseMakefile, which for example when completing in the zsh
sources runs for about 2100 commands, or about 2/3 of all the lines in
the dump.

Yeah, that's pretty much it. In the end though I got a strange part, maybe it's normal:

 +-ftb-complete:15> -ftb-zstyle -s continuous-trigger continu>
  +-ftb-zstyle:1> zstyle -s :fzf-tab:complete:make:argument-r>
 +-ftb-complete:16> [[ linux-gnu == msys ]]
 +-ftb-complete:16> continuous_trigger=/
 +-ftb-complete:19> case 0 (0)
 +-ftb-complete:20> return 1
+_complete_debug:26> integer ret=1
+_complete_debug:27> unsetopt xtrace

I'm bugged about this `linux-gnu == msys` part.

Besides that, there is anyway to speed things up or, in the worst case, disable auto-complete for make command? It's unusable for me right now.

BTW, I added the logs I got in this gist: https://gist.github.com/mhalano/de5dcc83dc92a445d888a7812d56b023

Thanks!

--
Marcos Alano





Messages sorted by: Reverse Date, Date, Thread, Author