]> git.proxmox.com Git - cargo.git/commitdiff
Update bash completion
authorgentoo90 <gentoo90@gmail.com>
Wed, 21 Dec 2016 19:12:16 +0000 (21:12 +0200)
committergentoo90 <gentoo90@gmail.com>
Wed, 21 Dec 2016 19:12:16 +0000 (21:12 +0200)
src/etc/cargo.bashcomp.sh

index 006df91c13ab1aae145406ee3da143477d16ae6a..b68488dd4b226f3ba02ebe3f33a590c7fe380964 100644 (file)
@@ -10,6 +10,7 @@ _cargo()
 
        local vcs='git hg none'
        local color='auto always never'
+       local msg_format='human json'
 
        local opt_help='-h --help'
        local opt_verbose='-v --verbose'
@@ -20,38 +21,41 @@ _cargo()
        local opt_feat='--features --all-features --no-default-features'
        local opt_mani='--manifest-path'
        local opt_jobs='-j --jobs'
+       local opt_force='-f --force'
+       local opt_test='--test --bench'
+       local opt_lock='--frozen --locked'
 
        local opt___nocmd="$opt_common -V --version --list"
-       local opt__bench="$opt_common $opt_pkg $opt_feat $opt_mani $opt_jobs --target --lib --bin --test --bench --example --no-run"
-       local opt__build="$opt_common $opt_pkg $opt_feat $opt_mani $opt_jobs --target --lib --bin --test --bench --example --release"
-       local opt__check="$opt_common $opt_pkg $opt_feat $opt_mani $opt_jobs --target --lib --bin --example"
-       local opt__clean="$opt_common $opt_pkg $opt_mani --target --release"
-       local opt__doc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_jobs --target --open --no-deps --release"
-       local opt__fetch="$opt_common $opt_mani"
+       local opt__bench="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --no-run"
+       local opt__build="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release"
+       local opt__check="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release"
+       local opt__clean="$opt_common $opt_pkg $opt_mani $opt_lock --target --release"
+       local opt__doc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --bin --lib --target --open --no-deps --release"
+       local opt__fetch="$opt_common $opt_mani $opt_lock"
        local opt__generate_lockfile="${opt__fetch}"
-       local opt__git_checkout="$opt_common --reference --url"
+       local opt__git_checkout="$opt_common $opt_lock --reference --url"
        local opt__help="$opt_help"
-       local opt__init="$opt_common --bin --name --vcs"
-       local opt__install="$opt_common $opt_feat $opt_jobs --bin --branch --debug --example --git --list --path --rev --root --tag --vers"
+       local opt__init="$opt_common $opt_lock --bin --lib --name --vcs"
+       local opt__install="$opt_common $opt_feat $opt_jobs $opt_lock $opt_force --bin --branch --debug --example --git --list --path --rev --root --tag --vers"
        local opt__locate_project="$opt_mani -h --help"
-       local opt__login="$opt_common --host"
-       local opt__metadata="$opt_common $opt_feat $opt_mani --format-version"
-       local opt__new="$opt_common --vcs --bin --name"
-       local opt__owner="$opt_common -a --add -r --remove -l --list --index --token"
-       local opt__package="$opt_common $opt_mani -l --list --no-verify --no-metadata"
-       local opt__pkgid="${opt__fetch}"
-       local opt__publish="$opt_common $opt_mani --host --token --no-verify"
-       local opt__read_manifest="$opt_help $opt_verbose $opt_mani $opt_color"
-       local opt__run="$opt_common $opt_feat $opt_mani $opt_jobs --target --bin --example --release"
-       local opt__rustc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_jobs --target --lib --bin --test --bench --example --release"
-       local opt__rustdoc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_jobs --target --lib --bin --test --bench --example --release --open"
-       local opt__search="$opt_common --host"
-       local opt__test="$opt_common $opt_pkg $opt_feat $opt_mani $opt_jobs --target --lib --bin --test --bench --example --no-run --release --no-fail-fast"
-       local opt__uninstall="$opt_common --bin --root"
-       local opt__update="$opt_common $opt_pkg $opt_mani --aggressive --precise"
+       local opt__login="$opt_common $opt_lock --host"
+       local opt__metadata="$opt_common $opt_feat $opt_mani $opt_lock --format-version --no-deps"
+       local opt__new="$opt_common $opt_lock --vcs --bin --lib --name"
+       local opt__owner="$opt_common $opt_lock -a --add -r --remove -l --list --index --token"
+       local opt__package="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty -l --list --no-verify --no-metadata"
+       local opt__pkgid="${opt__fetch} $opt_pkg"
+       local opt__publish="$opt_common $opt_mani $opt_lock $opt_jobs --allow-dirty --dry-run --host --token --no-verify"
+       local opt__read_manifest="$opt_help $opt_verbose $opt_mani $opt_color --no-deps"
+       local opt__run="$opt_common $opt_feat $opt_mani $opt_lock $opt_jobs --message-format --target --bin --example --release"
+       local opt__rustc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --profile --target --lib --bin --example --release"
+       local opt__rustdoc="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --target --lib --bin --example --release --open"
+       local opt__search="$opt_common $opt_lock --host --limit"
+       local opt__test="$opt_common $opt_pkg $opt_feat $opt_mani $opt_lock $opt_jobs $opt_test --message-format --all --doc --target --lib --bin --example --no-run --release --no-fail-fast"
+       local opt__uninstall="$opt_common $opt_lock --bin --root"
+       local opt__update="$opt_common $opt_pkg $opt_mani $opt_lock --aggressive --precise"
        local opt__verify_project="${opt__fetch}"
        local opt__version="$opt_help $opt_verbose $opt_color"
-       local opt__yank="$opt_common --vers --undo --index --token"
+       local opt__yank="$opt_common $opt_lock --vers --undo --index --token"
 
        if [[ $cword -eq 1 ]]; then
                if [[ "$cur" == -* ]]; then
@@ -67,6 +71,9 @@ _cargo()
                        --color)
                                COMPREPLY=( $( compgen -W "$color" -- "$cur" ) )
                                ;;
+                       --message-format)
+                               COMPREPLY=( $( compgen -W "$msg_format" -- "$cur" ) )
+                               ;;
                        --manifest-path)
                                _filedir toml
                                ;;