# HG changeset patch # User Oleksandr Gavenko # Date 1698578688 -7200 # Node ID ee5840caf22c3e560166ffb92add484db95a566f # Parent 831e2c1bf98040a925418a95010ace34e20b2ac7 Added "scoop bucket" Bash completion. diff -r 831e2c1bf980 -r ee5840caf22c .bash_completion.d/scoop --- a/.bash_completion.d/scoop Wed Mar 29 23:42:06 2023 +0300 +++ b/.bash_completion.d/scoop Sun Oct 29 13:24:48 2023 +0200 @@ -58,6 +58,25 @@ cd "$olddir" return ;; + bucket) + if [[ $COMP_CWORD = 2 ]]; then + COMPREPLY=( $(compgen -W 'add list known rm' -- "$cur") ) + return + fi + local subcmd="${COMP_WORDS[2]}" + case "$subcmd" in + list|known) + COMPREPLY=( ) + return + ;; + add|rm) + local -a buckets=( `scoop bucket known` ) + local cr=$'\r' + buckets=( "${buckets[@]/$cr/}" ) + COMPREPLY=( $(compgen -W '${buckets[@]}' -- "$cur") ) + return + ;; + esac esac }