2023-10-14 23:11:40 +02: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 18:29:32 +02:00
|
|
|
local completion_suggestions
|
2023-10-14 23:11:40 +02:00
|
|
|
local si=$IFS
|
|
|
|
IFS=$'
|
2023-10-15 18:29:32 +02:00
|
|
|
' completion_suggestions=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" cdk --get-yargs-completions "${words[@]}"))
|
2023-10-14 23:11:40 +02:00
|
|
|
IFS=$si
|
2023-10-15 18:29:32 +02:00
|
|
|
_describe 'values' completion_suggestions
|
2023-10-14 23:11:40 +02:00
|
|
|
}
|
|
|
|
compdef _cdk_yargs_completions cdk
|
|
|
|
###-end-cdk-completions-###
|
|
|
|
|
|
|
|
export ZSH_AUTOSUGGEST=true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
autoload -U compinit
|
|
|
|
compinit
|