diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:53:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 15:53:52 +0000 |
commit | efe47381c599b07e4c7bbdb2e91e8090a541c887 (patch) | |
tree | 05cf57183f5a23394eca11b00f97a74a5dfdf79d /scripts/salsa.bash_completion | |
parent | Initial commit. (diff) | |
download | devscripts-efe47381c599b07e4c7bbdb2e91e8090a541c887.tar.xz devscripts-efe47381c599b07e4c7bbdb2e91e8090a541c887.zip |
Adding upstream version 2.23.4+deb12u1.upstream/2.23.4+deb12u1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | scripts/salsa.bash_completion | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/scripts/salsa.bash_completion b/scripts/salsa.bash_completion new file mode 100644 index 0000000..2dbebcb --- /dev/null +++ b/scripts/salsa.bash_completion @@ -0,0 +1,57 @@ +# /usr/share/bash-completion/completions/salsa +# Bash command completion for ‘salsa(1)’. +# Documentation: ‘bash(1)’, section “Programmable Completion”. + +shopt -s progcomp + +_salsa_completion () { + COMPREPLY=() + + local cur="${COMP_WORDS[COMP_CWORD]}" + local prev="${COMP_WORDS[COMP_CWORD-1]}" + + local opts="--help --skip --skip-file -C --chdir --debug" + opts+=" --all --conf-file --no-conf --desc --no-desc --desc-pattern" + opts+=" --disable-kgb --disable-tagpending --group --group-id" + opts+=" --enable-remove-source-branch --disable-remove-source-branch" + opts+=" --issues --mr --repo --forks --lfs --packages --jobs --pages" + opts+=" --container --analytics --requirements --wiki --snippets" + opts+=" --releases --auto-devops --request-acc --ci-config-path" + opts+=" --mr-allow-squash --no-mr-allow-squash --mr-desc --mr-title" + opts+=" --mr-dst-branch --mr-dst-project --mr-remove-source-branch" + opts+=" --schedule-desc --schedule-ref --schedule-cron --schedule-tz" + opts+=" --schedule-enable --schedule-disable --schedule-run --schedule-delete" + opts+=" --no-remove-source-branch --mr-src-branch --mr-src-project" + opts+=" --kgb --no-kgb --kgb-options --irc-channel --path --tagpending" + opts+=" --irker --no-irker --disable-irker --no-disable-irker" + opts+=" --no-tagpending --no-fail --rename-head --token --token-file" + opts+=" --user --user-id --verbose --archived --build-timeout --avatar-path" + opts+=" --request-access" + local commands=" add_user check_repo checkout co create_repo del_repo" + commands+=" del_user group list_groups list_repos ls join push" + commands+=" fork forks merge_request merge_requests mr mrs" + commands+=" protect_branch protected_branches purge_cache push_repo" + commands+=" search search_group search_project search_user" + commands+=" update_repo update_safe update_user whoami last_ci_status ci" + commands+=" pipes pipelines schedules pipe pipeline schedule" + case "${prev}" in + --api-url) ;& + --desc-pattern) ;& + --irc-channel) ;& + --path) ;& + --group-id) ;& + --user-id) + COMPREPLY=() + ;; + *) + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W "$opts" -- $cur ) ) + else + COMPREPLY=( $( compgen -W "$commands" -- $cur ) ) + fi + ;; + esac + return 0 +} + +complete -F _salsa_completion salsa |