Giter VIP home page Giter VIP logo

Comments (4)

jmalloc avatar jmalloc commented on September 26, 2024

For my own reference:

from grit.

ezzatron avatar ezzatron commented on September 26, 2024

Based on some stack overflow answer I read, that ^ is kinda the cheating way, that supposedly makes Zsh slower. I assume that there are comparable Zsh completion features that can be used instead of simply polyfilling for Bash's features.

from grit.

jmalloc avatar jmalloc commented on September 26, 2024

If you run grit shell-integration you will see what's getting added to .bash_profile for bash users -- very happy to detect zsh and add support to this command (which is hidden from the command list, btw).

20:16 jmalloc/grit master: grit shell-integration

grit() {
    local file="$(mktemp)"
    trap "rm -f '$file'" EXIT
    "/Users/james/bin/grit" --with-shell-integration="$file" "$@" && source "$file"
    return $?
}

# Setup autocompletion using the real binary.
_grit_bash_autocomplete() {
    local cur opts base
    COMPREPLY=()
    cur="${COMP_WORDS[COMP_CWORD]}"
    opts=$(GRIT_COMP_WORDS="${COMP_WORDS[@]}" "/Users/james/bin/grit" ${COMP_WORDS[@]:1:$COMP_CWORD} --generate-bash-completion)
    COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
    return 0
}

complete -F _grit_bash_autocomplete grit

from grit.

jmalloc avatar jmalloc commented on September 26, 2024

I am using a completely different CLI library in v2.0.0, which natively supports zsh completion. I don't intend to fix this in version 1.

from grit.

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.