From 07455024c72c3aa0bacf8338b82d3a0b8a96a9b0 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 4 Jan 2024 11:23:50 -0300 Subject: re "s|echo \"\\\$|printf '%s\\\n' \"\$|g" Replace all cases where `echo` was given a variable as its first argument, even on cases where we always know what the variable's content look like. --- bin/playlist | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/playlist') diff --git a/bin/playlist b/bin/playlist index bfb609e0..0c291693 100755 --- a/bin/playlist +++ b/bin/playlist @@ -75,7 +75,7 @@ F="$XDG_DATA_HOME"/euandreh/playlist.txt prompt() { ENTRY="$(zenity --text 'URL of the video to enqueue:' --entry ||:)" if [ -n "$ENTRY" ]; then - echo "$ENTRY" >> "$F" + printf '%s\n' "$ENTRY" >> "$F" fi } @@ -85,7 +85,7 @@ run() { return fi mpv "$next" - echo "$next" >> "queue.$F" + printf '%s\n' "$next" >> "queue.$F" tail -n+2 "$F" | sponge "$F" } -- cgit v1.3