nu_scripts icon indicating copy to clipboard operation
nu_scripts copied to clipboard

Micromamba support

Open flying-sheep opened this issue 2 years ago • 3 comments

In order to support micromamba, I changed the completion in the conda.nu module to:

def get-envs [] {
    micromamba env list --json | from json | get envs | each { |p| { path: $p, name: ($p | path basename) } }
}

def 'nu-complete conda envs' [] {
    get-envs | get name
}

and the first lines of export def-env activate to:

let envs = (get-envs)
let env_dir = ($envs | where name == $env_name | get path | first)

flying-sheep avatar Sep 20 '22 16:09 flying-sheep

I'm assuming this is more of a tip than an issue. If that's the case. We can just close this and people who search for micromamba can find it.

fdncred avatar Sep 20 '22 17:09 fdncred

we could change it to autodetect.

let flavor = if (which conda | length) == 0 { 'conda' } else if ... else { make error { ... }}

flying-sheep avatar Sep 21 '22 08:09 flying-sheep

we could change ...

Sure. If someone wants to submit that to close this issue. I'm cool with that.

fdncred avatar Sep 21 '22 16:09 fdncred

fixed by #800 can you try again @flying-sheep ?

AucaCoyan avatar Mar 27 '24 14:03 AucaCoyan

Looks good!

flying-sheep avatar Mar 27 '24 17:03 flying-sheep