commit:     303918d8e91ff89a91c54a960a5268710966d92d
Author:     Kerin Millar <kfm <AT> plushkava <DOT> net>
AuthorDate: Wed Feb  4 06:27:35 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb  6 01:45:15 2026 +0000
URL:        
https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=303918d8

Have _quote_args_bash() always print a trailing $'\n'

Presently, the shquote binary prints a trailing newline, whether or not
any arguments are given, as did the awk implementation that preceded it.
The bash implementation does not, however.

Have it do so. Apart from eliminating an unnecessary discrepancy, it is
simpler to explain and document.

Signed-off-by: Kerin Millar <kfm <AT> plushkava.net>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 functions.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/functions.sh b/functions.sh
index 467f746..ace4d12 100644
--- a/functions.sh
+++ b/functions.sh
@@ -717,7 +717,6 @@ if [ "${BASH_VERSINFO-0}" -ge 5 ]; then
                _quote_args_bash() {
                        local IFS=" " args word
 
-                       (( $# > 0 )) || return 0
                        for word in "${@@Q}"; do
                                if [[ ${word} == \$* ]]; then
                                        args+=("${word//\\E/\\e}")

Reply via email to