Use path based SHELL in Makefiles. It was suggested that this is a better solution for make for cases when there is no /usr/bin/env. See: https://github.com/purpleidea/mgmt/pull/694#discussion_r1015596204
14 lines
338 B
Bash
Executable File
14 lines
338 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
_cli_bash_autocomplete_mgmt() {
|
|
local cur prev opts base
|
|
COMPREPLY=()
|
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion )
|
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
|
return 0
|
|
}
|
|
|
|
complete -F _cli_bash_autocomplete_mgmt mgmt
|