Closed cipri-tom closed 5 months ago
Hi @cipri-tom. :wave:
First question: which installation method did you use?
Second question: do you have your base environment active by default?
My first guess is that you have the mamba completion script installed and active, but not the conda one.
Hi @tartansandal !
I used method 1: mamba install mamba-bash-completion
, which installs 3 packages: bash-completion
, conda-bash-completion
, and mamba-bash-completion
.
(base) $ conda list | grep compl
bash-completion 2.11 h694c41f_1 conda-forge
conda-bash-completion 1.7 h694c41f_1 conda-forge
mamba-bash-completion 1.0 h694c41f_1 conda-forge
Yes, the base is active by default.
I suspect the completion is installed in a folder that bash doesn't look into. I don't know which one, nor how to tell the completion part to look there (I suppose it's not source
)
Thank you for your help in this !
Apologies for the late reply -- I've been sick with COVID and complications for the passed 4 weeks.
Since you already had bash_completion2
installed via homebrew
, using the (manual) method2 should work. And to keep things clean do mamba remove mamba-bash-completion
. I'm not sure what will happen if both methods are used at the same time.
Note, manual installation method2 puts the files under ~/.local/share/...
whereas the automatic installation method puts the files under your conda/mamba base environment and used special tweaks to the included bash_completion library to get them to be called.
Hey, no worries ! Thank you for taking effort through the sickness to look at this ! Hope you recover well and fully !!
Great, I've installed manually. I've put the conda
from this repo, and mamba
from the mamba completion into /usr/local/Cellar/bash-completion@2/2.13.0/share/bash-completion/completions
because I wasn't sure if ~/.local/share/...
would be taken into account.
And yes, conda
works now.
mamba
completes, but with weird stuff:
$ mamba ac<tab>
aclocal aclocal-1.10 aclocal-1.11 aclocal-1.12 aclocal-1.13 aclocal-1.14 aclocal-1.15 aclocal-1.16 acpi
Ah, it's because I was in the completions
directory, so it was completing with names from there. If I move to home folder, mamba
doesn't suggest any completions. Should I open an issue in mamba completion repo ?
Here's the trace from set -x
, if it helps:
The last line of the logs:
- compopt -o bashdefault -o default
indicates that it is falling back to default completion. Maybe you need to restart your terminal to get a fresh shell after moving the files around? :thinking: Note: the lasy-loading of the completion scripts may have become confused.
🤦 that was it, indeed ! Sorry I made you read through all that for such a simple fix .
Thanks immensely for your help !
Wishing you great health !
Hi there,
I have conda, mamba and completion for both installed in the
base
environment, on MacOS, but with bash ! At the same time, I havebash-completion2
installed with homebrew.For some reason,
conda
doesn't complete. However,mamba
completes, but only once, withrepoquery
. Second<tab>
inmamba <tab>repoquery<tab>
gives an error:-bash: _comp_conda: command not found
.So it seems that the installation did not work. How can I debug this ?
In my
.bashrc
, I have this:[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh"
And in my
.bash_profile
the block thatconda
initialization puts, but nothing about completion.Maybe I need to put the
conda
file somewhere, instead of direct installation ? But I'm not sure where. Any pointers?Thank you very much for the package, and for the maintainance !