mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-08-07 06:08:39 +02:00
feat(cdk): add plugin (#13831)
Co-authored-by: Marc Cornellà <marc@mcornella.com>
This commit is contained in:
parent
6adfef3a8b
commit
da368d6468
3 changed files with 57 additions and 0 deletions
32
plugins/cdk/README.md
Normal file
32
plugins/cdk/README.md
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
# AWS CDK Plugin
|
||||
|
||||
This plugin provides aliases and autocompletion for the [AWS Cloud Development Kit (CDK)](https://aws.amazon.com/cdk/) CLI.
|
||||
|
||||
## Usage
|
||||
|
||||
Add `cdk` to the plugins array in your `.zshrc`:
|
||||
|
||||
```zsh
|
||||
plugins=(... cdk)
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
- [AWS CDK CLI](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html) installed (`npm install -g aws-cdk`)
|
||||
|
||||
## Aliases
|
||||
|
||||
| Alias | Command | Description |
|
||||
| ------------ | ----------------- | ---------------------------------- |
|
||||
| `cdkl` | `cdk list` | List all stacks in the app |
|
||||
| `cdksynth` | `cdk synth` | Synthesize CloudFormation template |
|
||||
| `cdkdiff` | `cdk diff` | Compare deployed vs local stack |
|
||||
| `cdkdeploy` | `cdk deploy` | Deploy stack to AWS |
|
||||
| `cdkdestroy` | `cdk destroy` | Destroy deployed stack |
|
||||
| `cdkboot` | `cdk bootstrap` | Bootstrap CDK environment |
|
||||
| `cdkdoc` | `cdk docs` | Open CDK documentation |
|
||||
| `cdkinit` | `cdk init` | Initialize a new CDK project |
|
||||
| `cdkwatch` | `cdk watch` | Watch for changes and auto-deploy |
|
||||
| `cdkctx` | `cdk context` | Manage cached context values |
|
||||
| `cdkack` | `cdk acknowledge` | Acknowledge a notice |
|
||||
| `cdkver` | `cdk --version` | Print CDK version |
|
||||
12
plugins/cdk/_cdk
Normal file
12
plugins/cdk/_cdk
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#compdef cdk
|
||||
|
||||
# Originally found and adapted from: https://github.com/aws/aws-cdk/discussions/24380#discussioncomment-5158176
|
||||
|
||||
local -a reply
|
||||
local IFS
|
||||
IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" \
|
||||
COMP_LINE="$BUFFER" \
|
||||
COMP_POINT="$CURSOR" \
|
||||
cdk --get-yargs-completions "${words[@]}"))
|
||||
|
||||
_describe 'values' reply
|
||||
13
plugins/cdk/cdk.plugin.zsh
Normal file
13
plugins/cdk/cdk.plugin.zsh
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# Aliases
|
||||
alias cdkl='cdk list'
|
||||
alias cdksynth='cdk synth'
|
||||
alias cdkdiff='cdk diff'
|
||||
alias cdkdeploy='cdk deploy'
|
||||
alias cdkdestroy='cdk destroy'
|
||||
alias cdkboot='cdk bootstrap'
|
||||
alias cdkdoc='cdk docs'
|
||||
alias cdkinit='cdk init'
|
||||
alias cdkwatch='cdk watch'
|
||||
alias cdkctx='cdk context'
|
||||
alias cdkack='cdk acknowledge'
|
||||
alias cdkver='cdk --version'
|
||||
Loading…
Reference in a new issue