nu_scripts icon indicating copy to clipboard operation
nu_scripts copied to clipboard

Problems in auto generated custom-completion files

Open tsathis opened this issue 3 years ago • 5 comments

Some auto generated custom-completion files have syntax errors. As an example the git.nu has syntax errors in following locations:

https://github.com/nushell/nu_scripts/blob/7d5c2f0a2e004b10727cdd6a0a5a0911cc54de9c/custom-completions/auto-generate/completions/git.nu#L1

https://github.com/nushell/nu_scripts/blob/7d5c2f0a2e004b10727cdd6a0a5a0911cc54de9c/custom-completions/auto-generate/completions/git.nu#L785-L789

https://github.com/nushell/nu_scripts/blob/7d5c2f0a2e004b10727cdd6a0a5a0911cc54de9c/custom-completions/auto-generate/completions/git.nu#L1450

Related: #256 #257

tsathis avatar Jun 24 '22 10:06 tsathis

Agreed. It was a quick first take at auto-generating custom completions from zsh completions (I believe). Feel free to help fix these. We wanted to land these, even though they weren't perfect, in the hope that someone else would come along and help polish them off.

fdncred avatar Jun 24 '22 11:06 fdncred

I'm happy to help fixing these. @fdncred Is the plan to manually correct the auto-generated scripts or only focus on correcting the generators?

tsathis avatar Jun 24 '22 14:06 tsathis

Is the plan to manually correct the...

I'd prefer that the generators be fixed myself. so, when new ones are added to other system (zsh) we can just run the generator again and get accurate custom completions. what do you think?

fdncred avatar Jun 24 '22 15:06 fdncred

I'd prefer that the generators be fixed myself...

Yes, that would be the cleanest solution. With a good testing mechanism it will be the best option. However, in the interim allowing manual fixing of generated scripts may be good.

tsathis avatar Jun 25 '22 11:06 tsathis

ok, I'm down with whatever. there's a bunch of noop completions in here that need to be fixed too.

fdncred avatar Jun 25 '22 11:06 fdncred