|
1 | | -# ldc completion -*- shell-script -*- |
2 | | - |
3 | | -# This bash completions script was generated by |
4 | | -# completely (https://github.com/dannyben/completely) |
5 | | -# Modifying it manually is not recommended |
6 | | - |
7 | | -_ldc_completions_filter() { |
8 | | - local words="$1" |
9 | | - local cur=${COMP_WORDS[COMP_CWORD]} |
10 | | - local result=() |
11 | | - |
12 | | - if [[ "${cur:0:1}" == "-" ]]; then |
13 | | - echo "$words" |
14 | | - |
15 | | - else |
16 | | - for word in $words; do |
17 | | - [[ "${word:0:1}" != "-" ]] && result+=("$word") |
18 | | - done |
19 | | - |
20 | | - echo "${result[*]}" |
21 | | - |
22 | | - fi |
23 | | -} |
24 | | - |
25 | | -_ldc_completions() { |
26 | | - local cur=${COMP_WORDS[COMP_CWORD]} |
27 | | - local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}") |
28 | | - local compline="${compwords[*]}" |
29 | | - |
30 | | - case "$compline" in |
31 | | - 'dclong/jupyterhub-ds'*) |
32 | | - while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ldc_completions_filter "-d --detach --docker-in-docker --dry-run --extra-port-mappings -h --help -m --mount-home -P --password -p --port -u --user")" -- "$cur") |
33 | | - ;; |
34 | | - |
35 | | - 'dclong/vscode-server'*) |
36 | | - while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ldc_completions_filter "-d --detach --docker-in-docker --dry-run --extra-port-mappings -h --help -m --mount-home -P --password -p --port -u --user")" -- "$cur") |
37 | | - ;; |
38 | | - |
39 | | - *) |
40 | | - while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ldc_completions_filter "dclong/jupyterhub-ds dclong/vscode-server -d --detach --docker-in-docker --dry-run --extra-port-mappings -h --help -m --mount-home -P --password -p --port -u --user")" -- "$cur") |
41 | | - ;; |
42 | | - |
43 | | - esac |
44 | | -} && |
45 | | - complete -F _ldc_completions ldc |
46 | | - |
47 | | -# ex: filetype=sh |
| 1 | +# ldc completion -*- shell-script -*- |
| 2 | + |
| 3 | +# This bash completions script was generated by |
| 4 | +# completely (https://github.com/dannyben/completely) |
| 5 | +# Modifying it manually is not recommended |
| 6 | + |
| 7 | +_ldc_completions_filter() { |
| 8 | + local words="$1" |
| 9 | + local cur=${COMP_WORDS[COMP_CWORD]} |
| 10 | + local result=() |
| 11 | + |
| 12 | + if [[ "${cur:0:1}" == "-" ]]; then |
| 13 | + echo "$words" |
| 14 | + |
| 15 | + else |
| 16 | + for word in $words; do |
| 17 | + [[ "${word:0:1}" != "-" ]] && result+=("$word") |
| 18 | + done |
| 19 | + |
| 20 | + echo "${result[*]}" |
| 21 | + |
| 22 | + fi |
| 23 | +} |
| 24 | + |
| 25 | +_ldc_completions() { |
| 26 | + local cur=${COMP_WORDS[COMP_CWORD]} |
| 27 | + local compwords=("${COMP_WORDS[@]:1:$COMP_CWORD-1}") |
| 28 | + local compline="${compwords[*]}" |
| 29 | + |
| 30 | + case "$compline" in |
| 31 | + 'dclong/jupyterhub-ds'*) |
| 32 | + while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ldc_completions_filter "-d --detach --docker-in-docker --dry-run --extra-port-mappings -h --help -m --mount-home -P --password -p --port -u --user")" -- "$cur") |
| 33 | + ;; |
| 34 | + |
| 35 | + 'dclong/vscode-server'*) |
| 36 | + while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ldc_completions_filter "-d --detach --docker-in-docker --dry-run --extra-port-mappings -h --help -m --mount-home -P --password -p --port -u --user")" -- "$cur") |
| 37 | + ;; |
| 38 | + |
| 39 | + *) |
| 40 | + while read -r; do COMPREPLY+=("$REPLY"); done < <(compgen -W "$(_ldc_completions_filter "dclong/jupyterhub-ds dclong/vscode-server -d --detach --docker-in-docker --dry-run --extra-port-mappings -h --help -m --mount-home -P --password -p --port -u --user")" -- "$cur") |
| 41 | + ;; |
| 42 | + |
| 43 | + esac |
| 44 | +} && |
| 45 | + complete -F _ldc_completions ldc |
| 46 | + |
| 47 | +# ex: filetype=sh |
0 commit comments