From 6077d258b500b20e1e705f5cda567400240c7804 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 11:36:25 +0200 Subject: Adding upstream version 2.21.3+deb11u1. Signed-off-by: Daniel Baumann --- scripts/salsa.bash_completion | 51 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 scripts/salsa.bash_completion (limited to 'scripts/salsa.bash_completion') diff --git a/scripts/salsa.bash_completion b/scripts/salsa.bash_completion new file mode 100644 index 0000000..c1bff67 --- /dev/null +++ b/scripts/salsa.bash_completion @@ -0,0 +1,51 @@ +# /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-issues --no-enable-issues --disable-issues" + opts+=" --enable-mr --no-enable-mr --disable-mr --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+=" --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" + 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" + 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 -- cgit v1.2.3