client: completion: complete docker images by $USER
Simplifies completion on multi-user systems.
This commit is contained in:
@@ -31,7 +31,7 @@ function docker-finance::completion()
|
|||||||
local _prev="${COMP_WORDS[COMP_CWORD - 1]}"
|
local _prev="${COMP_WORDS[COMP_CWORD - 1]}"
|
||||||
|
|
||||||
local _images
|
local _images
|
||||||
mapfile -t _images < <(docker images --format "{{.Repository}}:{{.Tag}}" --filter=reference='docker-finance/*/*:*' | cut -d'/' -f2-)
|
mapfile -t _images < <(docker images --format "{{.Repository}}:{{.Tag}}" --filter=reference='docker-finance/*/*:*' | cut -d'/' -f2- | grep $USER)
|
||||||
declare -r _images
|
declare -r _images
|
||||||
|
|
||||||
local -r _commands=("gen" "edit" "build" "backup" "rm" "up" "down" "start" "stop" "run" "shell" "version" "license" "linter" "doxygen" "plugins")
|
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