mirror of
https://github.com/spf13/cobra
synced 2025-05-05 04:47:22 +00:00
style(bash-v2): use herestring in activehelp extraction
Herestrings read cleaner than process substitutions, and work in posix mode (but we do and will have some process substitutions so this doesn't matter much). Both approaches may end up using temporary files.
This commit is contained in:
parent
aa6017008a
commit
ef504a698b
1 changed files with 1 additions and 1 deletions
|
@ -183,7 +183,7 @@ __%[1]s_extract_activeHelp() {
|
|||
# Not an activeHelp line but a normal completion
|
||||
completions+=("$comp")
|
||||
fi
|
||||
done < <(printf "%%s\n" "${out}")
|
||||
done <<<"${out}"
|
||||
}
|
||||
|
||||
__%[1]s_handle_completion_types() {
|
||||
|
|
Loading…
Add table
Reference in a new issue