t/t9902-completion.sh: backslashes in echo

The usage of backslashes in echo is not portable.  Since some tests
tries to output strings containing '\b' it is safer to use printf
here.  The usage of printf instead of echo is also preferred by POSIX.

Signed-off-by: Marcel Telka <marcel@telka.sk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Marcel Telka
2024-05-17 16:08:45 +02:00
committed by Junio C Hamano
parent 0f063b6c76
commit ba1dec3257

View File

@@ -73,7 +73,7 @@ _get_comp_words_by_ref ()
print_comp ()
{
local IFS=$'\n'
echo "${COMPREPLY[*]}" > out
printf '%s\n' "${COMPREPLY[*]}" > out
}
run_completion ()