From edcf8cead8bc04bca1a29ad50acdb835c936cafd Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sat, 13 Sep 2025 11:50:44 +0100 Subject: lib.sh: use xprintf in x_ don't echo the arguments this new logic shows quotes, in error outputs. Signed-off-by: Leah Rowe --- include/lib.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/lib.sh b/include/lib.sh index 7728a4c6..63aea2b7 100644 --- a/include/lib.sh +++ b/include/lib.sh @@ -149,8 +149,8 @@ dx_() x_() { - [ $# -lt 1 ] || [ -n "$1" ] || err "Empty first arg: x_ $(echo "$@")" - [ $# -lt 1 ] || "$@" || err "Unhandled error for: $(echo "$@")"; : + [ $# -lt 1 ] || [ -n "$1" ] || err "Empty first arg: x_ $(xprintf "$@")" + [ $# -lt 1 ] || "$@" || err "Unhandled error for: $(xprintf "$@")"; : } xchk() @@ -167,6 +167,7 @@ xprintf() while [ $# -gt 0 ]; do printf "\"%s\"" "$1" xprintfargs=1 + [ $# -gt 1 ] && printf " "; : shift 1 done [ $xprintfargs -gt 0 ] && printf "\n"; : -- cgit v1.2.1