gradle-completion | Gradle tab completion for bash and zsh
kandi X-RAY | gradle-completion Summary
kandi X-RAY | gradle-completion Summary
Bash and Zsh completion support for Gradle.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gradle-completion
gradle-completion Key Features
gradle-completion Examples and Code Snippets
Community Discussions
Trending Discussions on gradle-completion
QUESTION
I would like to allow completion for --flags
after other input in my gradle completion script, but _arguments
seems to require that
specs that describe option flags must precede specs that describe non-option ("positional" or "normal") arguments of the analyzed line (from the zsh completion docs)
In other words: command foo --o[TAB]
does nothing, but command --o[TAB]
works fine. Is there any way to configure _arguments
or do I need to use other control functions?
NOTE: Separate completion functions do not seem like an option in my case as the inputs are not in a fixed list (gradle tasks are arbitrary and multiple can be specified, gradle myfoo mybar --o[TAB]
must work).
ANSWER
Answered 2017-Feb-07 at 20:17So you want to be able to type something like vim foo -[TAB]
and have a list auto expand to show flags and switches, where currently you have to type vim -[TAB]
to get your flags and switches and then type foo
, yes?
Hopefully I am understanding your question correctly.
My current zsh completion options might be able to help with this, as I can do what I described, which seems to be what you are asking for? It has been quite a while sense I set these up so I don't remember precisely what each one does. What I belive you want though is the setopt COMPLETE_IN_WORD
, unset LIST_AMBIGUOUS
, as well as the zstyle ':completion::approximate*:*' prefix-needed false
options. If I am wrong someone please correct me.
I have included what I use in my zsh as my completion section. I have tested this as standalone and it works on my zsh as is.
QUESTION
I just published a new zsh tab completion script for Gradle but got a puzzler of an issue I hope is just a simple error on my part.
A bug reporter says he's getting "_gradle:14: parse error near `]]'" when trying to invoke completion on zsh 5.0.5 on SUSE, but this code works fine for me on zsh 5.0.8 on macOS and Ubuntu Yakkety.
Can you see anything here that would cause a script parse error?
...ANSWER
Answered 2017-Jan-25 at 14:40This must be due to unexpected values of $1
or $cache_ttl_mins
.
You could circumvent the call to find
and implement the check analog to other policy_checks
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gradle-completion
Download and place _gradle on your $fpath. I recommend $HOME/.zsh/gradle-completion:.
Download and place gradle-completion.bash in your bash_completion.d folder, usually /etc/bash_completion.d, /usr/local/etc/bash_completion.d, or $HOME/bash_completion.d:. NOTE: Ensure bash-completion 1.2+ is installed using your favorite package manager or by following the bash-completion installation instructions.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page