mirror of
https://github.com/mas-cli/mas
synced 2024-11-21 19:23:01 +00:00
f1a9cde9fd
Use braces around bash variable uses. Partial #638 Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
17 lines
377 B
Bash
17 lines
377 B
Bash
#!/usr/bin/env bash
|
|
|
|
_mas() {
|
|
local cur prev words cword
|
|
if declare -F _init_completions >/dev/null 2>&1; then
|
|
_init_completion
|
|
else
|
|
COMPREPLY=()
|
|
_get_comp_words_by_ref cur prev words cword
|
|
fi
|
|
if [[ "${cword}" -eq 1 ]]; then
|
|
COMPREPLY=($(compgen -W "$(mas help | tail -n +3 | awk '{print $1}')" -- "${cur}"))
|
|
return 0
|
|
fi
|
|
}
|
|
|
|
complete -F _mas mas
|