branch: elpa/with-editor
commit e804473ff9b2621a58b9184f6cc7cd7740936d47
Author: Stéphane Soppera <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
with-editor-export-editor: Use printf instead of echo
The `-e' flag of `echo' that makes the command interpret
backslash-escaped sequences (in particular "\037") is not supported
in all shells.
Shells that do not support it print the flag instead.
So here we replace `echo' by `printf' which seems to be better
supported and does the interpretation of backslash-escaped sequence
by default.
Re #71.
Closes #72.
---
with-editor.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/with-editor.el b/with-editor.el
index 4e439b7..03fd979 100644
--- a/with-editor.el
+++ b/with-editor.el
@@ -176,7 +176,7 @@ please see
https://github.com/magit/magit/wiki/Emacsclient."))))
(defcustom with-editor-sleeping-editor "\
sh -c '\
-echo -e \"WITH-EDITOR: $$ OPEN $0\\037 IN $(pwd)\"; \
+printf \"WITH-EDITOR: $$ OPEN $0\\037 IN $(pwd)\\n\"; \
sleep 604800 & sleep=$!; \
trap \"kill $sleep; exit 0\" USR1; \
trap \"kill $sleep; exit 1\" USR2; \