mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-07-27 13:57:46 +00:00
update bash completion
This commit is contained in:
+27
-1
@@ -54,12 +54,14 @@ _aptly()
|
|||||||
{
|
{
|
||||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||||
|
prevprev="${COMP_WORDS[COMP_CWORD-2]}"
|
||||||
|
|
||||||
commands="api config db graph mirror package publish repo serve snapshot task version"
|
commands="api config db graph mirror package publish repo serve snapshot task version"
|
||||||
options="-architectures= -config= -db-open-attempts= -dep-follow-all-variants -dep-follow-recommends -dep-follow-source -dep-follow-suggests -dep-verbose-resolve -gpg-provider="
|
options="-architectures= -config= -db-open-attempts= -dep-follow-all-variants -dep-follow-recommends -dep-follow-source -dep-follow-suggests -dep-verbose-resolve -gpg-provider="
|
||||||
db_subcommands="cleanup recover"
|
db_subcommands="cleanup recover"
|
||||||
mirror_subcommands="create drop edit show list rename search update"
|
mirror_subcommands="create drop edit show list rename search update"
|
||||||
publish_subcommands="drop list repo snapshot switch update"
|
publish_subcommands="drop list repo snapshot switch update source"
|
||||||
|
publish_source_subcommands="drop list add remove update"
|
||||||
snapshot_subcommands="create diff drop filter list merge pull rename search show verify"
|
snapshot_subcommands="create diff drop filter list merge pull rename search show verify"
|
||||||
repo_subcommands="add copy create drop edit import include list move remove rename search show"
|
repo_subcommands="add copy create drop edit import include list move remove rename search show"
|
||||||
package_subcommands="search show"
|
package_subcommands="search show"
|
||||||
@@ -148,6 +150,17 @@ _aptly()
|
|||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
case "$prevprev" in
|
||||||
|
"publish")
|
||||||
|
case "$prev" in
|
||||||
|
"source")
|
||||||
|
COMPREPLY=($(compgen -W "${publish_source_subcommands}" -- ${cur}))
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
case "$cmd" in
|
case "$cmd" in
|
||||||
"mirror")
|
"mirror")
|
||||||
case "$subcmd" in
|
case "$subcmd" in
|
||||||
@@ -575,6 +588,19 @@ _aptly()
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
"source")
|
||||||
|
case "$subcmd" in
|
||||||
|
"add")
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
"list")
|
||||||
|
if [[ $numargs -eq 0 ]]; then
|
||||||
|
COMPREPLY=($(compgen -W "-raw" -- ${cur}))
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
"package")
|
"package")
|
||||||
case "$subcmd" in
|
case "$subcmd" in
|
||||||
"search")
|
"search")
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ chown -R `stat -c %u /work/src` /var/lib/aptly
|
|||||||
|
|
||||||
args="$@"
|
args="$@"
|
||||||
if [ -z "$args" ]; then
|
if [ -z "$args" ]; then
|
||||||
|
cp /work/src/completion.d/aptly /usr/share/bash-completion/completions/
|
||||||
cmd="bash"
|
cmd="bash"
|
||||||
else
|
else
|
||||||
cmd="make $@"
|
cmd="make $@"
|
||||||
|
|||||||
Reference in New Issue
Block a user