diff options
| author | Marcel Telka <marcel@telka.sk> | 2024-05-17 16:08:45 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-05-17 12:13:26 -0700 |
| commit | ba1dec3257c5c8eb7edb71a16e5f642bf51d895d (patch) | |
| tree | e35a3f5f212c9643767e5b8f7401a31b363ec549 | |
| parent | Switch grep from non-portable BRE to portable ERE (diff) | |
| download | git-ba1dec3257c5c8eb7edb71a16e5f642bf51d895d.tar.gz git-ba1dec3257c5c8eb7edb71a16e5f642bf51d895d.zip | |
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>
| -rwxr-xr-x | t/t9902-completion.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index 963f865f27..ed3d03367e 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -73,7 +73,7 @@ _get_comp_words_by_ref () print_comp () { local IFS=$'\n' - echo "${COMPREPLY[*]}" > out + printf '%s\n' "${COMPREPLY[*]}" > out } run_completion () |
