mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-01-11 03:11:50 +00:00
Add -json output flag to repo list|show
Signed-off-by: Joshua Colson <joshua.colson@gmail.com>
This commit is contained in:
committed by
Lorenzo Bolla
parent
f9d08e1377
commit
1f56fb86e3
@@ -285,6 +285,7 @@ local keyring="*-keyring=[gpg keyring to use when verifying Release file (could
|
||||
;;
|
||||
list)
|
||||
_arguments '1:: :' \
|
||||
"-json=[display list in JSON format]:$bool" \
|
||||
"-raw=[display list in machine−readable format]:$bool"
|
||||
;;
|
||||
move)
|
||||
@@ -300,6 +301,7 @@ local keyring="*-keyring=[gpg keyring to use when verifying Release file (could
|
||||
;;
|
||||
show)
|
||||
_arguments \
|
||||
"-json=[display record in JSON format]:$bool" \
|
||||
"-with-packages=[show list of packages]:$bool" \
|
||||
"(-)2:repo name:$repos"
|
||||
;;
|
||||
|
||||
@@ -314,7 +314,11 @@ _aptly()
|
||||
;;
|
||||
"list")
|
||||
if [[ $numargs -eq 0 ]]; then
|
||||
COMPREPLY=($(compgen -W "-raw" -- ${cur}))
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=($(compgen -W "-raw -json" -- ${cur}))
|
||||
else
|
||||
COMPREPLY=($(compgen -W "$(__aptly_repo_list)" -- ${cur}))
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
;;
|
||||
@@ -361,7 +365,7 @@ _aptly()
|
||||
"show")
|
||||
if [[ $numargs -eq 0 ]]; then
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=($(compgen -W "-with-packages" -- ${cur}))
|
||||
COMPREPLY=($(compgen -W "-json -with-packages" -- ${cur}))
|
||||
else
|
||||
COMPREPLY=($(compgen -W "$(__aptly_repo_list)" -- ${cur}))
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user