feat: cleanup .local/bin
This commit is contained in:
parent
757b759b4a
commit
87d37712dd
21 changed files with 69 additions and 86 deletions
14
.local/share/bash-completion/completions/ddev
Normal file
14
.local/share/bash-completion/completions/ddev
Normal file
|
@ -0,0 +1,14 @@
|
|||
function _ddev() {
|
||||
# limited to 100 images
|
||||
for i in {1..5}; do
|
||||
URL="https://hub.docker.com/v2/repositories/library/?page=$i&page_size=100"
|
||||
mapfile -t res < <(compgen -W \
|
||||
"$(curl -sfL "$URL" | jq -r '.results[].name')" \
|
||||
-- "${COMP_WORDS[1]}")
|
||||
if [ -z "${res[0]}" ]; then
|
||||
break
|
||||
fi
|
||||
COMPREPLY+=("${res[@]}")
|
||||
done
|
||||
}
|
||||
complete -F _ddev ddev
|
Loading…
Add table
Add a link
Reference in a new issue