forked from ohmyzsh/ohmyzsh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
130 changed files
with
36,071 additions
and
4,601 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
## Aliases Cheatsheet | ||
# Aliases cheatsheet | ||
|
||
**Maintainer:** [@hqingyi](https://github.com/hqingyi) | ||
|
||
With lots of 3rd-party amazing aliases installed, this plugin helps list the shortcuts | ||
that are currently available based on the plugins you have enabled. | ||
|
||
Enable this plugin by adding it to your `plugins` definition in `~/.zshrc`. | ||
To use it, add `aliases` to the plugins array in your zshrc file: | ||
|
||
``` | ||
plugins=(aliases) | ||
``` | ||
```zsh | ||
plugins=(aliases) | ||
``` | ||
|
||
Requirements: Python needs to be installed. | ||
|
||
### Usage | ||
## Usage | ||
|
||
``` | ||
acs: group all alias | ||
acs $keywordquickly filter alias & highlight | ||
``` | ||
- `acs`: show all aliases by group. | ||
|
||
- `acs <keyword>`: filter aliases by `<keyword>` and highlight. | ||
|
||
![screenshot](https://cloud.githubusercontent.com/assets/3602957/11581913/cb54fb8a-9a82-11e5-846b-5a67f67ad9ad.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#compdef ant | ||
|
||
_ant_does_target_list_need_generating () { | ||
[[ ! -f .ant_targets ]] && return 0 | ||
[[ build.xml -nt .ant_targets ]] && return 0 | ||
return 1 | ||
} | ||
|
||
_ant () { | ||
if [[ ! -f build.xml ]]; then | ||
return | ||
fi | ||
|
||
if ! _ant_does_target_list_need_generating; then | ||
return | ||
fi | ||
|
||
ant -p | awk -F " " 'NR > 5 { print lastTarget } { lastTarget = $1 }' >| .ant_targets | ||
compadd -- "$(cat .ant_targets)" | ||
} | ||
|
||
_ant "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,2 @@ | ||
_ant_does_target_list_need_generating () { | ||
[ ! -f .ant_targets ] && return 0; | ||
[ build.xml -nt .ant_targets ] && return 0; | ||
return 1; | ||
} | ||
|
||
_ant () { | ||
if [ -f build.xml ]; then | ||
if _ant_does_target_list_need_generating; then | ||
ant -p | awk -F " " 'NR > 5 { print lastTarget }{lastTarget = $1}' > .ant_targets | ||
fi | ||
compadd -- `cat .ant_targets` | ||
fi | ||
} | ||
|
||
compdef _ant ant | ||
# Default to colored output | ||
export ANT_ARGS='-logger org.apache.tools.ant.listener.AnsiColorLogger' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,3 @@ | ||
# cargo | ||
|
||
This plugin adds completion for the Rust build tool [`Cargo`](https://github.com/rust-lang/cargo). | ||
|
||
To use it, add `cargo` to the plugins array in your zshrc file: | ||
|
||
```zsh | ||
plugins=(... cargo) | ||
``` | ||
|
||
Updated on March 3rd, 2019, from [Cargo 0.34.0](https://github.com/rust-lang/cargo/releases/tag/0.34.0). | ||
**Deprecated: use the [`rust`](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/rust) plugin instead.** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,15 @@ | ||
if (( $+commands[rustup] && $+commands[cargo] )); then | ||
# remove old generated completion file | ||
command rm -f "${0:A:h}/_cargo" | ||
|
||
# generate new completion file | ||
ver="$(cargo --version)" | ||
ver_file="$ZSH_CACHE_DIR/cargo_version" | ||
comp_file="$ZSH_CACHE_DIR/completions/_cargo" | ||
|
||
mkdir -p "${comp_file:h}" | ||
(( ${fpath[(Ie)${comp_file:h}]} )) || fpath=("${comp_file:h}" $fpath) | ||
|
||
if [[ ! -f "$comp_file" || ! -f "$ver_file" || "$ver" != "$(< "$ver_file")" ]]; then | ||
rustup completions zsh cargo >| "$comp_file" | ||
echo "$ver" >| "$ver_file" | ||
fi | ||
|
||
declare -A _comps | ||
autoload -Uz _cargo | ||
_comps[cargo]=_cargo | ||
|
||
unset ver ver_file comp_file | ||
fi | ||
print ${(%):-'%F{yellow}The `cargo` plugin is deprecated and has been moved to the `rust` plugin.'} | ||
print ${(%):-'Please update your .zshrc to use the `%Brust%b` plugin instead.%f'} | ||
|
||
# TODO: 2021-12-28: remove this block | ||
# Handle $0 according to the standard: | ||
# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html | ||
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}" | ||
0="${${(M)0:#/*}:-$PWD/$0}" | ||
# Remove old generated completion file | ||
command rm -f "${0:A:h}/_cargo" "$ZSH_CACHE_DIR/cargo_version" | ||
|
||
(( ${fpath[(Ie)$ZSH/plugins/rust]} )) || { | ||
fpath=("$ZSH/plugins/rust" $fpath) | ||
source "$ZSH/plugins/rust/rust.plugin.zsh" | ||
} |
Oops, something went wrong.