mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-10-16 19:50:09 +00:00
Compare commits
No commits in common. "d0bddee6e3703e78f588d037078606d41a4d6237" and "c8ba08581dff43c18c1b0d9e7312ca32e6d97124" have entirely different histories.
d0bddee6e3
...
c8ba08581d
3 changed files with 27 additions and 29 deletions
7
.github/dependencies.yml
vendored
7
.github/dependencies.yml
vendored
|
@ -29,10 +29,3 @@ dependencies:
|
|||
postcopy: |
|
||||
set -e
|
||||
test -e dependencies/OMZ-README.md && cat dependencies/OMZ-README.md >> README.md
|
||||
plugins/gradle:
|
||||
repo: gradle/gradle-completion
|
||||
branch: master
|
||||
version: 25da917cf5a88f3e58f05be3868a7b2748c8afe6
|
||||
precopy: |
|
||||
set -e
|
||||
find . ! -name _gradle ! -name LICENSE -delete
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
Copyright (c) 2017 Eric Wendelin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,4 +1,28 @@
|
|||
#compdef gradle gradlew gw
|
||||
# THE LINE ABOVE MUST BE THE FIRST LINE OF THIS FILE IN ORDER FOR COMPLETION TO WORK
|
||||
|
||||
#
|
||||
# Taken from https://github.com/gradle/gradle-completion
|
||||
# Copyright (c) 2017 Eric Wendelin
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
# this software and associated documentation files (the "Software"), to deal in
|
||||
# the Software without restriction, including without limitation the rights to
|
||||
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
# of the Software, and to permit persons to whom the Software is furnished to do
|
||||
# so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
# Terms
|
||||
|
||||
__gradle-set-project-root-dir() {
|
||||
local dir=`pwd`
|
||||
|
@ -14,7 +38,7 @@ __gradle-set-project-root-dir() {
|
|||
}
|
||||
|
||||
__gradle-init-cache-dir() {
|
||||
cache_dir="${GRADLE_USER_HOME:-$HOME/.gradle}/completion"
|
||||
cache_dir="$HOME/.gradle/completion"
|
||||
mkdir -p $cache_dir
|
||||
}
|
||||
|
||||
|
@ -74,7 +98,7 @@ __gradle-generate-script-cache() {
|
|||
zle -R "Generating Gradle build script cache"
|
||||
# Cache all Gradle scripts
|
||||
local -a gradle_build_scripts
|
||||
gradle_build_scripts=( $(find $project_root_dir -type f -name "*.gradle" -o -name "*.gradle.kts" 2>/dev/null | grep -E -v "$script_exclude_pattern") )
|
||||
gradle_build_scripts=( $(find $project_root_dir -type f -name "*.gradle" -o -name "*.gradle.kts" 2>/dev/null | egrep -v "$script_exclude_pattern") )
|
||||
printf "%s\n" "${gradle_build_scripts[@]}" >| $cache_dir/$cache_name
|
||||
fi
|
||||
}
|
||||
|
@ -101,7 +125,7 @@ __gradle-generate-tasks-cache() {
|
|||
local gradle_all_tasks="" root_tasks="" subproject_tasks="" output_line
|
||||
local -a match
|
||||
for output_line in ${(f)"$(printf "%s\n" "${gradle_tasks_output[@]}")"}; do
|
||||
if [[ $output_line =~ ^([[:alpha:]][[:alnum:][:punct:]]*)([[:space:]]-[[:space:]]([[:print:]]*))? ]]; then
|
||||
if [[ $output_line =~ ^([[:lower:]][[:alnum:][:punct:]]*)([[:space:]]-[[:space:]]([[:print:]]*))? ]]; then
|
||||
local task_name="${match[1]}"
|
||||
local task_description="${match[3]}"
|
||||
# Completion for subproject tasks with ':' prefix
|
||||
|
|
Loading…
Reference in a new issue