debian/bash-completion/dotenv
raw| 1 | # dotenv(1) completion |
| 2 | # Copyright 2017 Federico Ceratto <[email protected]> |
| 3 | # Distributed under BSD-3-clause license |
| 4 | |
| 5 | _dotenv() |
| 6 | { |
| 7 | local cur prev words cword |
| 8 | _init_completion || return |
| 9 | |
| 10 | if [[ $cur == -* ]]; then |
| 11 | # suggest options |
| 12 | COMPREPLY=( $( compgen -W '-f -q --help' -- "$cur" ) ) |
| 13 | else |
| 14 | COMPREPLY=( $( compgen -W 'get list set unset -f -q --help' -- "$cur" ) ) |
| 15 | fi |
| 16 | |
| 17 | return 0 |
| 18 | } && |
| 19 | complete -F _dotenv dotenv |