iterative / shtab

↔️ Automagic shell tab completion for Python CLI applications
https://docs.iterative.ai/shtab
Other
375 stars 34 forks source link

[feature] why shtab don't have shell completion by itself? #89

Closed Freed-Wu closed 1 year ago

Freed-Wu commented 2 years ago

I notice shtab.main.get_main_parser don't use shtab.add_argument_to. Can it do?

casperdcl commented 2 years ago

Doggfooding à la https://docs.iterative.ai/shtab/use/#library-usage? Sure...

Freed-Wu commented 2 years ago

I know we can use shtab --shell=tcsh shtab.main.get_main_parser --error-unimportable | sudo tee /etc/profile.d/shtab.completion.csh to generate shell completion. I want to know why not shtab --print-completion XXX? The latter looks better.

casperdcl commented 2 years ago

Yes makes sense, feel free to add it :)