mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-06 02:51:32 +01:00
Merge branch 'ohmyzsh:master' into omz-subexecutor
This commit is contained in:
commit
274d43ce03
13 changed files with 39 additions and 37 deletions
7
.github/dependencies.yml
vendored
7
.github/dependencies.yml
vendored
|
|
@ -29,3 +29,10 @@ dependencies:
|
||||||
postcopy: |
|
postcopy: |
|
||||||
set -e
|
set -e
|
||||||
test -e dependencies/OMZ-README.md && cat dependencies/OMZ-README.md >> README.md
|
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
|
||||||
|
|
|
||||||
|
|
@ -448,7 +448,7 @@ function _omz::plugin::load {
|
||||||
if [[ ! -f "$base/_$plugin" && ! -f "$base/$plugin.plugin.zsh" ]]; then
|
if [[ ! -f "$base/_$plugin" && ! -f "$base/$plugin.plugin.zsh" ]]; then
|
||||||
_omz::log warn "'$plugin' is not a valid plugin"
|
_omz::log warn "'$plugin' is not a valid plugin"
|
||||||
continue
|
continue
|
||||||
# It it is a valid plugin, add its directory to $fpath unless it is already there
|
# It is a valid plugin, add its directory to $fpath unless it is already there
|
||||||
elif (( ! ${fpath[(Ie)$base]} )); then
|
elif (( ! ${fpath[(Ie)$base]} )); then
|
||||||
fpath=("$base" $fpath)
|
fpath=("$base" $fpath)
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# catimg
|
# catimg
|
||||||
|
|
||||||
Plugin for displaying images on the terminal using the the `catimg.sh` script provided by [posva](https://github.com/posva/catimg)
|
Plugin for displaying images on the terminal using the `catimg.sh` script provided by [posva](https://github.com/posva/catimg)
|
||||||
|
|
||||||
To use it, add `catimg` to the plugins array in your zshrc file:
|
To use it, add `catimg` to the plugins array in your zshrc file:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ __docker-compose_subcommand() {
|
||||||
'--resolve-image-digests[Pin image tags to digests.]' \
|
'--resolve-image-digests[Pin image tags to digests.]' \
|
||||||
'--services[Print the service names, one per line.]' \
|
'--services[Print the service names, one per line.]' \
|
||||||
'--volumes[Print the volume names, one per line.]' \
|
'--volumes[Print the volume names, one per line.]' \
|
||||||
'--hash[Print the service config hash, one per line. Set "service1,service2" for a list of specified services.]' \ && ret=0
|
'--hash[Print the service config hash, one per line. Set "service1,service2" for a list of specified services.]' && ret=0
|
||||||
;;
|
;;
|
||||||
(create)
|
(create)
|
||||||
_arguments \
|
_arguments \
|
||||||
|
|
|
||||||
|
|
@ -27,4 +27,4 @@ The plugin uses a custom launcher (which we'll call here `$EMACS_LAUNCHER`) that
|
||||||
| eeval | `$EMACS_LAUNCHER --eval` | Same as `M-x eval` but from outside Emacs |
|
| eeval | `$EMACS_LAUNCHER --eval` | Same as `M-x eval` but from outside Emacs |
|
||||||
| eframe | `emacsclient --alternate-editor="" --create-frame` | Create new X frame |
|
| eframe | `emacsclient --alternate-editor="" --create-frame` | Create new X frame |
|
||||||
| efile | - | Print the path to the file open in the current buffer |
|
| efile | - | Print the path to the file open in the current buffer |
|
||||||
| ecd | - | Print the directory of the file open in the the current buffer |
|
| ecd | - | Print the directory of the file open in the current buffer |
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ function efile {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Write to standard output the directory of the file
|
# Write to standard output the directory of the file
|
||||||
# opened in the the current buffer
|
# opened in the current buffer
|
||||||
function ecd {
|
function ecd {
|
||||||
local file
|
local file
|
||||||
file="$(efile)" || return $?
|
file="$(efile)" || return $?
|
||||||
|
|
|
||||||
19
plugins/gradle/LICENSE
Normal file
19
plugins/gradle/LICENSE
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
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,28 +1,4 @@
|
||||||
#compdef gradle gradlew gw
|
#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() {
|
__gradle-set-project-root-dir() {
|
||||||
local dir=`pwd`
|
local dir=`pwd`
|
||||||
|
|
@ -38,7 +14,7 @@ __gradle-set-project-root-dir() {
|
||||||
}
|
}
|
||||||
|
|
||||||
__gradle-init-cache-dir() {
|
__gradle-init-cache-dir() {
|
||||||
cache_dir="$HOME/.gradle/completion"
|
cache_dir="${GRADLE_USER_HOME:-$HOME/.gradle}/completion"
|
||||||
mkdir -p $cache_dir
|
mkdir -p $cache_dir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -98,7 +74,7 @@ __gradle-generate-script-cache() {
|
||||||
zle -R "Generating Gradle build script cache"
|
zle -R "Generating Gradle build script cache"
|
||||||
# Cache all Gradle scripts
|
# Cache all Gradle scripts
|
||||||
local -a gradle_build_scripts
|
local -a gradle_build_scripts
|
||||||
gradle_build_scripts=( $(find $project_root_dir -type f -name "*.gradle" -o -name "*.gradle.kts" 2>/dev/null | egrep -v "$script_exclude_pattern") )
|
gradle_build_scripts=( $(find $project_root_dir -type f -name "*.gradle" -o -name "*.gradle.kts" 2>/dev/null | grep -E -v "$script_exclude_pattern") )
|
||||||
printf "%s\n" "${gradle_build_scripts[@]}" >| $cache_dir/$cache_name
|
printf "%s\n" "${gradle_build_scripts[@]}" >| $cache_dir/$cache_name
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
@ -125,7 +101,7 @@ __gradle-generate-tasks-cache() {
|
||||||
local gradle_all_tasks="" root_tasks="" subproject_tasks="" output_line
|
local gradle_all_tasks="" root_tasks="" subproject_tasks="" output_line
|
||||||
local -a match
|
local -a match
|
||||||
for output_line in ${(f)"$(printf "%s\n" "${gradle_tasks_output[@]}")"}; do
|
for output_line in ${(f)"$(printf "%s\n" "${gradle_tasks_output[@]}")"}; do
|
||||||
if [[ $output_line =~ ^([[:lower:]][[:alnum:][:punct:]]*)([[:space:]]-[[:space:]]([[:print:]]*))? ]]; then
|
if [[ $output_line =~ ^([[:alpha:]][[:alnum:][:punct:]]*)([[:space:]]-[[:space:]]([[:print:]]*))? ]]; then
|
||||||
local task_name="${match[1]}"
|
local task_name="${match[1]}"
|
||||||
local task_description="${match[3]}"
|
local task_description="${match[3]}"
|
||||||
# Completion for subproject tasks with ':' prefix
|
# Completion for subproject tasks with ':' prefix
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,7 @@ _ipfs_subcommand(){
|
||||||
_arguments \
|
_arguments \
|
||||||
'--resolve[Check if the given path can be resolved before publishing. Default: true.]' \
|
'--resolve[Check if the given path can be resolved before publishing. Default: true.]' \
|
||||||
'(-t --lifetime)'{-t,--lifetime}'[Time duration that the record will be valid for. Default: 24h.]' \
|
'(-t --lifetime)'{-t,--lifetime}'[Time duration that the record will be valid for. Default: 24h.]' \
|
||||||
'--allow-offline[When offline, save the IPNS record to the the local datastore without broadcasting to the network instead of simply failing.]' \
|
'--allow-offline[When offline, save the IPNS record to the local datastore without broadcasting to the network instead of simply failing.]' \
|
||||||
'--ttl[Time duration this record should be cached for. Uses the same syntax as the lifetime option. (caution: experimental).]' \
|
'--ttl[Time duration this record should be cached for. Uses the same syntax as the lifetime option. (caution: experimental).]' \
|
||||||
'(-k --key)'{-k,--key}"[Name of the key to be used or a valid PeerID, as listed by 'ipfs key list -l'. Default: self.]" \
|
'(-k --key)'{-k,--key}"[Name of the key to be used or a valid PeerID, as listed by 'ipfs key list -l'. Default: self.]" \
|
||||||
'(-Q --quieter)'{-Q,--quieter}'[Write only final hash.]' \
|
'(-Q --quieter)'{-Q,--quieter}'[Write only final hash.]' \
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ __run() {
|
||||||
'-address=[(addr) The address of the Nomad server. Overrides the NOMAD_ADDR environment variable if set. Default = http://127.0.0.1:4646]' \
|
'-address=[(addr) The address of the Nomad server. Overrides the NOMAD_ADDR environment variable if set. Default = http://127.0.0.1:4646]' \
|
||||||
'-region=[(region) The region of the Nomad servers to forward commands to. Overrides the NOMAD_REGION environment variable if set. Defaults to the Agent s local region.]' \
|
'-region=[(region) The region of the Nomad servers to forward commands to. Overrides the NOMAD_REGION environment variable if set. Defaults to the Agent s local region.]' \
|
||||||
'-no-color[Disables colored command output.]' \
|
'-no-color[Disables colored command output.]' \
|
||||||
'-check-index[If set, the job is only registered or updated if the the passed job modify index matches the server side version. If a check-index value of zero is passed, the job is only registered if it does not yet exist. If a non-zero value is passed, it ensures that the job is being updated from a known state. The use of this flag is most common in conjunction with plan command.]' \
|
'-check-index[If set, the job is only registered or updated if the passed job modify index matches the server side version. If a check-index value of zero is passed, the job is only registered if it does not yet exist. If a non-zero value is passed, it ensures that the job is being updated from a known state. The use of this flag is most common in conjunction with plan command.]' \
|
||||||
'-detach[Return immediately instead of entering monitor mode. After job submission, the evaluation ID will be printed to the screen, which can be used to examine the evaluation using the eval-status command.]' \
|
'-detach[Return immediately instead of entering monitor mode. After job submission, the evaluation ID will be printed to the screen, which can be used to examine the evaluation using the eval-status command.]' \
|
||||||
'-output[Output the JSON that would be submitted to the HTTP API without submitting the job.]' \
|
'-output[Output the JSON that would be submitted to the HTTP API without submitting the job.]' \
|
||||||
'-verbose[Show full information.]'
|
'-verbose[Show full information.]'
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# The idea/inspiration for a per directory history is from Stewart MacArthur[1]
|
# The idea/inspiration for a per directory history is from Stewart MacArthur[1]
|
||||||
# and Dieter[2], the implementation idea is from Bart Schaefer on the the zsh
|
# and Dieter[2], the implementation idea is from Bart Schaefer on the zsh
|
||||||
# mailing list[3]. The implementation is by Jim Hester in September 2012.
|
# mailing list[3]. The implementation is by Jim Hester in September 2012.
|
||||||
#
|
#
|
||||||
# [1]: http://www.compbiome.com/2010/07/bash-per-directory-bash-history.html
|
# [1]: http://www.compbiome.com/2010/07/bash-per-directory-bash-history.html
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ To use it, add `pyenv` to the plugins array in your zshrc file:
|
||||||
plugins=(... pyenv)
|
plugins=(... pyenv)
|
||||||
```
|
```
|
||||||
|
|
||||||
If you receive a `Found pyenv, but it is badly configured.` error on startup, you may need to ensure that `pyenv` is initialized before the oh-my-zsh pyenv plugin is loaded. This can be achived by adding the following earlier in the `.zshrc` file than the `plugins=(...)` line:
|
If you receive a `Found pyenv, but it is badly configured.` error on startup, you may need to ensure that `pyenv` is initialized before the oh-my-zsh pyenv plugin is loaded. This can be achieved by adding the following earlier in the `.zshrc` file than the `plugins=(...)` line:
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
export PYENV_ROOT="$HOME/.pyenv"
|
export PYENV_ROOT="$HOME/.pyenv"
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ use the `ssh-add-args` setting. You can pass multiple arguments separated by spa
|
||||||
zstyle :omz:plugins:ssh-agent ssh-add-args -K -c -a /run/user/1000/ssh-auth
|
zstyle :omz:plugins:ssh-agent ssh-add-args -K -c -a /run/user/1000/ssh-auth
|
||||||
```
|
```
|
||||||
|
|
||||||
These will then be passed the the `ssh-add` call as if written directly. The example
|
These will then be passed the `ssh-add` call as if written directly. The example
|
||||||
above will turn into:
|
above will turn into:
|
||||||
|
|
||||||
```zsh
|
```zsh
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue