Comments (4)
For my own reference:
- https://github.com/urfave/cli/blob/master/autocomplete/zsh_autocomplete
- https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org
from grit.
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.
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.
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)
- Is it possible to have the grit cd list sorted? HOT 4
- `grit cd` with no slug should change dir to the root of the current clone.
- Improve sorting of interactive clone selection prompts.
- Automatically detect Golang repos. HOT 1
- The set-url command's description seems innacurate HOT 1
- Convert to use GitHub actions.
- Command for creating GitHub repos. HOT 1
- Command for finding repos that have been renamed on GitHub.
- Deprecate the `--golang` option to `clone`, `mv`, etc.
- Setup Homebrew publishing from GitHub actions.
- Unable to clone empty repository. HOT 1
- Fresh clone lists default branch in `.git/config` twice. HOT 1
- Update to go-git v5
- Don't tell homebrew users to upgrade using self-update.
- Honour `init.defaultBranch` configuration value. HOT 1
- Git-style hooks HOT 1
- Git LFS support.
- Failure to auth with public key against GitHub while vanilla git works correctly. HOT 8
- Feature request: Improve automation of source configuration
- Using `grit set-url owner/repo` sets a non-canonical remote URL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grit.