mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-22 04:51:12 +02:00
Merge 03875b5251 into cb64103161
This commit is contained in:
commit
7450dafbd5
2 changed files with 43 additions and 0 deletions
21
plugins/cdk/README.md
Normal file
21
plugins/cdk/README.md
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# AWS CDK
|
||||
|
||||
This plugin adds completion for the [AWS Cloud Development Kit (CDK)](https://aws.amazon.com/cdk/), as well as some aliases for common commands.
|
||||
|
||||
To use it, add `cdk` to the plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... cdk)
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
| --------- | -------------- | --------------------------------------------------------- |
|
||||
| `cdkc` | `cdk context` | Manage cached context values |
|
||||
| `cdkd` | `cdk deploy` | Deploys the stack(s) named STACKS into your AWS account |
|
||||
| `cdkdiff` | `cdk diff` | Compares the specified stack with the deployed stack |
|
||||
| `cdki` | `cdk init` | Create a new, empty CDK project |
|
||||
| `cdkl` | `cdk list` | Lists all stacks in the app |
|
||||
| `cdks` | `cdk synth` | Synthesizes and prints the CloudFormation template |
|
||||
| `cdkx` | `cdk destroy` | Destroy the stack(s) named STACKS |
|
||||
22
plugins/cdk/cdk.plugin.zsh
Normal file
22
plugins/cdk/cdk.plugin.zsh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
if (( ! $+commands[cdk] )); then
|
||||
return
|
||||
fi
|
||||
|
||||
_cdk_yargs_completions() {
|
||||
local reply
|
||||
local si=$IFS
|
||||
IFS=$' '
|
||||
reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" cdk --get-yargs-completions "${words[@]}"))
|
||||
IFS=$si
|
||||
_describe 'values' reply
|
||||
}
|
||||
compdef _cdk_yargs_completions cdk
|
||||
|
||||
# Aliases
|
||||
alias cdkc="cdk context"
|
||||
alias cdkd="cdk deploy"
|
||||
alias cdkdiff="cdk diff"
|
||||
alias cdki="cdk init"
|
||||
alias cdkl="cdk list"
|
||||
alias cdks="cdk synth"
|
||||
alias cdkx="cdk destroy"
|
||||
Loading…
Add table
Add a link
Reference in a new issue