summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cfg.mk5
-rw-r--r--src/main.c2
-rw-r--r--tests/fedora4
3 files changed, 8 insertions, 3 deletions
diff --git a/cfg.mk b/cfg.mk
index 5e4a8902..a3927970 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -42,6 +42,11 @@ sc_prohibit_jm_in_m4:
{ echo '$(ME): do not use jm_ in m4 macro names' \
1>&2; exit 1; } || :
+sc_prohibit_echo_minus_en:
+ @re='\<echo -[en]' \
+ msg='do not use echo ''-e or echo ''-n; use printf instead' \
+ $(_prohibit_regexp)
+
update-copyright-env = \
UPDATE_COPYRIGHT_USE_INTERVALS=1 \
UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79
diff --git a/src/main.c b/src/main.c
index 8c9e776e..0bb40986 100644
--- a/src/main.c
+++ b/src/main.c
@@ -158,7 +158,7 @@ static const char *context_line_color = ""; /* default color pair */
of 1 ("\33[I"), i.e., it performs pure movement to the next
tab stop, without any clearing of either content or screen
attributes (including background color); try
- echo -ne 'asdfqwerzxcv\rASDF\tZXCV\n'
+ printf 'asdfqwerzxcv\rASDF\tZXCV\n'
in a bash(1) shell to demonstrate this. This is not what the
user would instinctively expect of HT (but is ok for CHT).
The instinctive behavior would include clearing the terminal
diff --git a/tests/fedora b/tests/fedora
index 20c0dc14..336d913c 100644
--- a/tests/fedora
+++ b/tests/fedora
@@ -15,8 +15,8 @@ then
D='\033[0m'
fi
-ok () { echo -e "${G}OK${D}"; }
-fail () { echo -e "${R}FAIL${D} (See ${U})"; failures=1; }
+ok () { printf "${G}OK${D}"; }
+fail () { printf "${R}FAIL${D} (See ${U})"; failures=1; }
U=https://bugzilla.redhat.com/show_bug.cgi?id=116909
printf "fgrep false negatives: "