mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-08-07 06:08:39 +02:00
Move _cdk completion
This commit is contained in:
parent
d129155380
commit
9627cc86c6
3 changed files with 18 additions and 20 deletions
|
|
@ -1,11 +1,6 @@
|
|||
# AWS CDK Plugin
|
||||
|
||||
This plugin provides aliases and autocompletion for the
|
||||
[AWS Cloud Development Kit (CDK)](https://aws.amazon.com/cdk/) CLI.
|
||||
|
||||
## Requirements
|
||||
|
||||
- [AWS CDK CLI](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html) installed (`npm install -g aws-cdk`)
|
||||
This plugin provides aliases and autocompletion for the [AWS Cloud Development Kit (CDK)](https://aws.amazon.com/cdk/) CLI.
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
@ -15,6 +10,10 @@ Add `cdk` to the plugins array in your `.zshrc`:
|
|||
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 |
|
||||
|
|
|
|||
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
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
# AWS CDK plugin for Oh My Zsh
|
||||
# Provides aliases and autocompletion for the AWS Cloud Development Kit (CDK) CLI
|
||||
|
||||
# Aliases
|
||||
alias cdkl='cdk list'
|
||||
alias cdksynth='cdk synth'
|
||||
|
|
@ -14,13 +11,3 @@ alias cdkwatch='cdk watch'
|
|||
alias cdkctx='cdk context'
|
||||
alias cdkack='cdk acknowledge'
|
||||
alias cdkver='cdk --version'
|
||||
|
||||
# Autocompletion
|
||||
if command -v cdk &>/dev/null; then
|
||||
_cdk_completion() {
|
||||
local -a completions
|
||||
completions=($(cdk completion 2>/dev/null))
|
||||
compadd -a completions
|
||||
}
|
||||
compdef _cdk_completion cdk
|
||||
fi
|
||||
Loading…
Reference in a new issue