dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit a68de79265437a5fd0d9282694cbfae6f3430a44
parent f53d78f02652ea67a34438c2b2504000c87ea675
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Wed, 28 Jul 2021 10:32:24 +0200

mpcq: fix handlnig of filenames with spaces

Diffstat:
Mscripts/mpcq | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/mpcq b/scripts/mpcq @@ -1,4 +1,5 @@ #!/bin/sh +printfq() { printf "'%s'\\n" "$(printf '%s' "$1" | sed -e "s/'/'\\\\''/g")"; } die() { printf '%s\n' "$1" >&2 && exit 1; } checkdeps() { @@ -48,7 +49,7 @@ while [ $(($#)) -ne 0 ]; do exit 1 ;; *) # preserve positional arguments - PARAMS="$PARAMS $(printf %s "$1")" + PARAMS="$PARAMS $(printfq "$1")" shift ;; esac