docker_pose/
completion.rs

1pub static POSE_COMPLETE: &str = r#"
2_pose_complete() {
3    local cur prev cmds opts opts_list opts_config opts_list_services opts_slug opts_get opts_list_commands
4    COMPREPLY=()
5    cur="${COMP_WORDS[COMP_CWORD]}"
6    prev="${COMP_WORDS[COMP_CWORD-1]}"
7    cmds="list config slug get help"
8    opts="-f --file --verbose -q --quiet --no-docker --no-consistency --no-interpolate -h --help -V --version"
9    opts_list="-p --pretty -h --help"
10    opts_config="-o --output -t --tag --tag-filter --ignore-unauthorized --no-slug --offline --progress --threads -h --help"
11    opts_list_services="-f --filter -h --help"
12    opts_slug="-h --help"
13    opts_get="-o --output --timeout-connect -m --max-time -H --header -h --help"
14    opts_list_commands="services images depends dependents volumes networks configs secrets profiles envs help"
15    pretty_values="full oneline"
16
17    _filedir() {
18        local IFS=$'\n'
19        COMPREPLY=( $(compgen -f -- "$1") )
20    }
21
22    if [[ ${cur} == -* ]] ; then
23        case "${prev}" in
24            pose)
25                COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
26                return 0
27                ;;
28            list)
29                COMPREPLY=( $(compgen -W "${opts_list}" -- ${cur}) )
30                return 0
31                ;;
32            config)
33                COMPREPLY=( $(compgen -W "${opts_config}" -- ${cur}) )
34                return 0
35                ;;
36            slug)
37                COMPREPLY=( $(compgen -W "${opts_slug}" -- ${cur}) )
38                return 0
39                ;;
40            get)
41                COMPREPLY=( $(compgen -W "${opts_get}" -- ${cur}) )
42                return 0
43                ;;
44            services)
45                COMPREPLY=( $(compgen -W "${opts_list_services}" -- ${cur}) )
46                return 0
47                ;;
48        esac
49    elif [[ ${cur} == * ]] ; then
50        case "${prev}" in
51            pose)
52                COMPREPLY=( $(compgen -W "${cmds}" -- ${cur}) )
53                return 0
54                ;;
55            list)
56                COMPREPLY=( $(compgen -W "${opts_list_commands}" -- ${cur}) )
57                return 0
58                ;;
59            -f|--file)
60                _filedir "${cur}"
61                return 0
62                ;;
63            -p|--pretty)
64                COMPREPLY=( $(compgen -W "${pretty_values}" -- ${cur}) )
65                return 0
66                ;;
67        esac
68    fi
69}
70
71complete -F _pose_complete pose"#;