2023-08-03 09:51:02 +02:00
|
|
|
#!/bin/env bash
|
2022-11-17 09:55:16 +01:00
|
|
|
|
2023-08-03 09:51:02 +02:00
|
|
|
#complete -W "--disable-motd --install-extensions --reset-codesetting docker-cli dotnet gitea golang nodejs volta powershell -h" arkanum
|
|
|
|
|
|
|
|
function _command_completions() {
|
|
|
|
local cur prev
|
|
|
|
cur=${COMP_WORDS[COMP_CWORD]}
|
|
|
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
|
|
|
|
|
|
case ${COMP_CWORD} in
|
|
|
|
1)
|
|
|
|
# shellcheck disable=2207,SC2086
|
|
|
|
COMPREPLY=($(compgen -W "config git install help" -- ${cur}))
|
|
|
|
;;
|
|
|
|
2)
|
|
|
|
case ${prev} in
|
|
|
|
config)
|
|
|
|
# shellcheck disable=2207,SC2086
|
|
|
|
COMPREPLY=($(compgen -W "disable-motd install-extensions reset-codesettings" -- ${cur}))
|
|
|
|
;;
|
|
|
|
git)
|
|
|
|
# shellcheck disable=2207,SC2086
|
|
|
|
COMPREPLY=($(compgen -W "setup" -- ${cur}))
|
|
|
|
;;
|
|
|
|
install)
|
|
|
|
# shellcheck disable=2207,SC2086
|
2024-07-17 14:01:20 +02:00
|
|
|
COMPREPLY=($(compgen -W "docker-cli dotnet golang bun nodejs volta powershell gitea lazygit" -- ${cur}))
|
2023-08-03 09:51:02 +02:00
|
|
|
;;
|
|
|
|
help)
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
COMPREPLY=()
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
complete -F _command_completions arkanum
|