Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fish completion #2769

Merged
merged 2 commits into from
Aug 23, 2023
Merged

Conversation

soraxas
Copy link
Contributor

@soraxas soraxas commented Aug 22, 2023

The fish completion for environments completion is currently broken.

That's due to some changes to micromamba's output.

I've tested that in previous micromamba version:

$ ./bin/micromamba --version
1.2.0

$ ./bin/micromamba env list

                                           __
          __  ______ ___  ____ _____ ___  / /_  ____ _
         / / / / __ `__ \/ __ `/ __ `__ \/ __ \/ __ `/
        / /_/ / / / / / / /_/ / / / / / / /_/ / /_/ /
       / .___/_/ /_/ /_/\__,_/_/ /_/ /_/_.___/\__,_/
      /_/

  Name     Active  Path                             
──────────────────────────────────────────────────────
  base             /home/soraxas/micromamba             
  my_other_env     /home/soraxas/micromamba/envs/octomap
...

Current latest version:

$ micromamba --version
1.4.6

$ micromamba env list
  Name     Active  Path                             
──────────────────────────────────────────────────────
  base             /home/soraxas/micromamba             
  my_other_env     /home/soraxas/micromamba/envs/octomap
...

Notice the missing $\mu$-mamba logo


We can fix the completion by changing the tail argument from 11 to 2, but I opt to a more "robust" approach using sed that currently works in both case.

But this is based on the assumption that

  1. base environment always exists, and
  2. base environment is always the first environment.

Are these assumption always correct?

@jonashaag
Copy link
Contributor

Thanks for the fix! Unfortunately both assumptions are incorrect I think

@jonashaag jonashaag merged commit 0624d3c into mamba-org:main Aug 23, 2023
cvanelteren pushed a commit to cvanelteren/mamba that referenced this pull request Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants