Code Monkey home page Code Monkey logo

Comments (3)

huyz-git avatar huyz-git commented on August 16, 2024 1

@huyizheng thanks for reporting this and thanks for using this completion. I am not sure how you ended up in this situation and I don't see an easy way to debug this. I will however leave this issue open however in case anyone else experiences this too or maybe even has a fix.

I fixed this bug, it seems cause by the line : :->command. (But I don't know why)
I just changed it into this, directly passes the function into the arguments:

_arguments -C $opts \
           ': :__conda_commands' \
           '*:: :->subcmd'

then this bugs is fixed.

Also, in the completion of conda env there's a similar bug, to fix it I create another function like this:

_env_command() {
    local -a env
    env=(
        create:'Create an environment based on an environment file'
        export:'Export a given environment'
        list:'List the Conda environments'
        remove:'Remove an environment'
        update:'Update the current environment based on environment file'
        )
    _describe -t env_commands "help commands"  env
}

And then directly passes it into the arguments:

    (env)
        _arguments -C $help_opts \
                      ': :_env_command' \
                      '*:: :->subcmd'

diff.txt

from conda-zsh-completion.

esc avatar esc commented on August 16, 2024

@huyizheng thanks for reporting this and thanks for using this completion. I am not sure how you ended up in this situation and I don't see an easy way to debug this. I will however leave this issue open however in case anyone else experiences this too or maybe even has a fix.

from conda-zsh-completion.

esc avatar esc commented on August 16, 2024

@huyz-git thank you for looking into this. Could you submit this as a pull-request, it will make testing and integration much easier, thank you!

from conda-zsh-completion.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.