From ef504a698b4b8e55e298682618a3bc9c507522dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 18 Jun 2022 22:51:31 +0200 Subject: [PATCH] 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. --- bash_completionsV2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bash_completionsV2.go b/bash_completionsV2.go index 429aaf71..dad2f0eb 100644 --- a/bash_completionsV2.go +++ b/bash_completionsV2.go @@ -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() {