client: completion: fix/optimize docker images
- Reduces overhead, catches all docker-finance images - Previously wouldn't catch all space between image name and tag
This commit is contained in:
@@ -31,7 +31,7 @@ function docker-finance::completion()
|
||||
local _prev="${COMP_WORDS[COMP_CWORD - 1]}"
|
||||
|
||||
local _images
|
||||
mapfile -t _images < <(docker image ls | grep ^docker-finance | cut -d'/' -f2- | cut -d' ' -f1-4 | sed -e 's/ /:/')
|
||||
mapfile -t _images < <(docker images --format "{{.Repository}}:{{.Tag}}" --filter=reference='docker-finance/*/*:*' | cut -d'/' -f2-)
|
||||
declare -r _images
|
||||
|
||||
local -r _commands=("gen" "edit" "build" "backup" "rm" "up" "down" "start" "stop" "run" "shell" "version" "license" "linter" "doxygen" "plugins")
|
||||
|
||||
Reference in New Issue
Block a user