2023-10-14 21:11:40 +00:00
|
|
|
# Check if the 'cdk' command is available in the system's PATH
|
|
|
|
if ! command -v cdk >/dev/null 2>&1; then
|
|
|
|
cdk() { npx -- cdk "$@" }
|
|
|
|
fi
|
|
|
|
|
|
|
|
###-begin-cdk-completions-###
|
|
|
|
_cdk_yargs_completions()
|
|
|
|
{
|
2023-10-15 16:29:32 +00:00
|
|
|
local completion_suggestions
|
2023-10-14 21:11:40 +00:00
|
|
|
local si=$IFS
|
|
|
|
IFS=$'
|
2023-10-15 16:29:32 +00:00
|
|
|
' completion_suggestions=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" cdk --get-yargs-completions "${words[@]}"))
|
2023-10-14 21:11:40 +00:00
|
|
|
IFS=$si
|
2023-10-15 16:29:32 +00:00
|
|
|
_describe 'values' completion_suggestions
|
2023-10-14 21:11:40 +00:00
|
|
|
}
|
|
|
|
compdef _cdk_yargs_completions cdk
|
|
|
|
###-end-cdk-completions-###
|
|
|
|
|
|
|
|
export ZSH_AUTOSUGGEST=true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
autoload -U compinit
|
|
|
|
compinit
|