diff options
author | Alexander Larsson <alexander.larsson@gmail.com> | 2015-01-23 15:47:06 +0100 |
---|---|---|
committer | Alexander Larsson <alexander.larsson@gmail.com> | 2015-01-23 15:47:06 +0100 |
commit | 97747a3e530350629ba0f757608185fe67b21184 (patch) | |
tree | 7f2b047f580c5028143e80055db93e50dfae844f /completion | |
parent | 0b19f58a6ff4123741e99573e3414b335d7fd543 (diff) | |
parent | 22f87409516f72a20e4c4ab38a851387d5e2624f (diff) | |
download | xdg-app-97747a3e530350629ba0f757608185fe67b21184.tar.gz |
Merge pull request #37 from matthiasclasen/user-option
Add a --system option to go with --user
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 d83411f..461ae10 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 |