tartansandal / conda-bash-completion

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

handle -f alias for --file #20

Open cfauchereau opened 1 year ago

cfauchereau commented 1 year ago

For now, the option --file autocomplete with filenames but not its alias -f. This is a simple fix to handle -f.

tartansandal commented 1 year ago

Thanks for the suggestion @cfauchereau. :smile: Unfortunately, -f is also used for --force-* by some sub-commands (like, clean and remove) so this would produce confusing completion results. :crying_cat_face: I think we would need somethings much more complex to account for all the variations.

cfauchereau commented 1 year ago

Fair enough. -f for --file is only used for the env subcommand. Fortunately it is easy to find the subcommand if any. I updated the code to take that into account.

tartansandal commented 1 year ago

Fair enough. -f for --file is only used for the env subcommand. Fortunately it is easy to find the subcommand if any. I updated the code to take that into account.

Awesome! The only thing we need now is some tests. :smile:

cfauchereau commented 1 year ago

I added tests. I had issues with running the tests. Most notably I add to remove set -o posix in tests/fixture/bashrc for it to work. Also some tests don't pass. I think it is due to conda changing some of their commands.

tartansandal commented 12 months ago

Hi @cfauchereau :wave: Just a heads up that I might not get a chance to review this for a week or so. Feel free to ping me in another week if I've not got back to this. :smile: