diff options
| author | EuAndreh <eu@euandre.org> | 2024-01-04 11:23:50 -0300 |
|---|---|---|
| committer | EuAndreh <eu@euandre.org> | 2024-01-04 11:23:55 -0300 |
| commit | 07455024c72c3aa0bacf8338b82d3a0b8a96a9b0 (patch) | |
| tree | c3e7074928e2783d9e97001f45e2a3522d52ba76 /etc/sh | |
| parent | etc/sh/rc: Fix "c" alias to use the correct command (diff) | |
| download | dotfiles-07455024c72c3aa0bacf8338b82d3a0b8a96a9b0.tar.gz dotfiles-07455024c72c3aa0bacf8338b82d3a0b8a96a9b0.tar.xz | |
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.
Diffstat (limited to 'etc/sh')
| -rw-r--r-- | etc/sh/rc | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -121,7 +121,7 @@ export VG_FLAGS=' --track-origins=yes --error-exitcode=1 ' -VG_FLAGS="$(echo "$VG_FLAGS" | grep . | tr -d '\t' | tr '\n' ' ')" +VG_FLAGS="$(printf '%s\n' "$VG_FLAGS" | grep . | tr -d '\t' | tr '\n' ' ')" export CFLAGS=' -D_POSIX_C_SOURCE=200809L @@ -144,7 +144,7 @@ export CFLAGS=' -g -Werror ' -CFLAGS="$(echo "$CFLAGS" | grep . | tr -d '\t' | tr '\n' ' ')" +CFLAGS="$(printf '%s\n' "$CFLAGS" | grep . | tr -d '\t' | tr '\n' ' ')" export CC=gcc export LEIN_SUPPRESS_USER_LEVEL_REPO_WARNINGS=1 export LEIN_HOME="$XDG_CONFIG_HOME"/leiningen @@ -363,8 +363,8 @@ g() { )" rm -f "$(dirname "$PAT")"/*-g-shell-function if [ -n "$LINE" ]; then - FILE="$( echo "$LINE" | cut -d: -f1)" - NUMBER="$(echo "$LINE" | cut -d: -f2)" + FILE="$( printf '%s\n' "$LINE" | cut -d: -f1)" + NUMBER="$(printf '%s\n' "$LINE" | cut -d: -f2)" case "$1" in "'"*"'") # Best effort handling of string escaping, since |
