tartansandal / conda-bash-completion

Bash completion support for conda
GNU General Public License v3.0
152 stars 7 forks source link

Feature request: Autocomplete on `conda env remove` or `conda env remove -n` #19

Closed thevoiddancer closed 1 year ago

thevoiddancer commented 1 year ago

First off, this project is great, lifesaver for longer env names.

But I'd like to see the option to autocomplete on conda env remove or conda env remove -n (kinda like conda activate autocompletes). Is that something that is hard to add?

tartansandal commented 1 year ago

Hi @thevoiddancer. Glad you are finding this project useful. :smile:

The completion should work with the full conda env remove --name <tab> invocation. The shorter forms are tricky to get right without breaking other completion targets, so I've avoided that. However, you can get completion on the sub command options with conda env remove -<tab>, so you don't have to type out the full --name. :wink:

Hope this helps!

thevoiddancer commented 1 year ago

Ah, I was so close! I keep using shortened forms whenever possible, so I didn't think of trying it with --name. And, as expected, that works. Now I just need to figure out how to get it working with aliases, but that's out of your scope I guess. Thanks for the --name tip!