diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-01-23 08:23:08 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-01-23 08:23:08 -0500 |
commit | 22f87409516f72a20e4c4ab38a851387d5e2624f (patch) | |
tree | af0fb8a28be807e8fcb73fc188a2499d9dc68dc4 /completion | |
parent | 9b5d630f8c967424eb15f37c901dcd265d6d4897 (diff) | |
download | xdg-app-22f87409516f72a20e4c4ab38a851387d5e2624f.tar.gz |
Some updates to the bash completion
Add the --system option and also --keep-ref for the uninstall
commands.
Diffstat (limited to 'completion')
-rwxr-xr-x | completion/xdg-app | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/completion/xdg-app b/completion/xdg-app index 4421adf..e50176f 100755 --- a/completion/xdg-app +++ b/completion/xdg-app @@ -17,15 +17,17 @@ _xdg-app() { local -A VERBS=( [ALL]='add-remote delete-remote list-remotes repo-contents install-runtime update-runtime uninstall-runtime list-runtimes install-app update-app uninstall-app list-apps run build-init build build-finish build-export' [MODE]='add-remote delete-remote list-remotes repo-contents install-runtime update-runtime uninstall-runtime list-runtimes install-app update-app uninstall-app list-apps' + [UNINSTALL]='uninstall-runtime uninstall-app' [ARCH]='build-init install-runtime install-app run uninstall-runtime uninstall-app update-runtime update-app' ) local -A OPTS=( [GENERAL]='--help --verbose --version' - [MODE]='--user' + [MODE]='--user --system' [ARCH]='--arch' [LIST_REMOTES]='--show-urls' [REPO_CONTENTS]='--show-details --runtimes --apps --update' + [UNINSTALL]='--keep-ref' [RUN]='--command --branch --devel' [BUILD_INIT]='--arch --var' [BUILD]='--runtime --network --x11' @@ -36,6 +38,8 @@ _xdg-app() { if __contains_word "--user" ${COMP_WORDS[*]}; then mode=--user + else + mode=--system fi if __contains_word "$prev" ${OPTS[ARG]}; then @@ -123,6 +127,9 @@ _xdg-app() { if __contains_word "$verb" ${VERBS[ARCH]}; then comps="$comps ${OPTS[ARCH]}" fi + if __contains_word "$verb" ${VERBS[UNINSTALL]}; then + comps="$comps ${OPTS[UNINSTALL]}" + fi if [ "$verb" = "run" ]; then comps="$comps ${OPTS[RUN]}" fi |