Adds "list-tags" command to list tags with no known tag required. Fixes #276

Example: skopeo list-tags docker://docker.io/library/centos
Returns response:
{
  Repository": "docker.io/library/centos",
  "Tags": [
    "6",
    "7",
    ...
  ]
}

Signed-off-by: Zach Hill <zach@anchore.com>
This commit is contained in:
Zach Hill
2018-11-20 23:52:36 -08:00
parent c8e0250903
commit cce44c45d5
7 changed files with 345 additions and 1 deletions

View File

@@ -144,6 +144,20 @@ _skopeo_layers() {
_complete_ "$options_with_args" "$boolean_options"
}
_skopeo_list_repository_tags() {
local options_with_args="
--authfile
--creds
--cert-dir
"
local boolean_options="
--tls-verify
--no-creds
"
_complete_ "$options_with_args" "$boolean_options"
}
_skopeo_skopeo() {
# XXX: Changes here need to be refleceted in the manually expanded
# string in the `case` statement below as well.
@@ -194,7 +208,7 @@ _cli_bash_autocomplete() {
local counter=1
while [ $counter -lt "$cword" ]; do
case "${words[$counter]}" in
skopeo|copy|inspect|delete|manifest-digest|standalone-sign|standalone-verify|help|h)
skopeo|copy|inspect|delete|manifest-digest|standalone-sign|standalone-verify|help|h|list-repository-tags)
command="${words[$counter]//-/_}"
cpos=$counter
(( cpos++ ))