nushell / nu_scripts

A place to share Nushell scripts with each other
MIT License
737 stars 227 forks source link

Problems in auto generated custom-completion files #258

Open tsathis opened 2 years ago

tsathis commented 2 years ago

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

fdncred commented 2 years ago

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.

tsathis commented 2 years ago

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?

fdncred commented 2 years ago

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?

tsathis commented 2 years ago

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.

fdncred commented 2 years ago

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