branch: externals/detached
commit 0e40156cf508e546fba330be768a9536fc1019cd
Author: Niklas Eklund <[email protected]>
Commit: Niklas Eklund <[email protected]>
Move eterm-color into detached.el
---
detached-env | 1 -
detached.el | 5 ++++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/detached-env b/detached-env
index 1960833994..39a74d5c86 100755
--- a/detached-env
+++ b/detached-env
@@ -5,7 +5,6 @@
detached_command="$*"
-TERM="eterm-color"
if eval "$detached_command"; then
echo -e "\nDetached session finished"
else
diff --git a/detached.el b/detached.el
index 5f108bf197..3db7cfb0f3 100644
--- a/detached.el
+++ b/detached.el
@@ -1171,11 +1171,14 @@ If SESSION is nonattachable fallback to a command that
doesn't rely on tee."
(if (detached--session-attachable session)
(format "2>&1 | tee %s" log)
(format "&> %s" log)))
+ ;; With detached-env
(env (if detached-env detached-env (format "%s -c"
detached-shell-program)))
+ ;; Without detached-env
+ (env (format "%s -c" detached-shell-program))
(command
(if (eq 'terminal-data (detached--session-env-mode session))
(shell-quote-argument
- (format "script --quiet --flush --return --command \"%s\"
/dev/null"
+ (format "TERM=eterm-color script --quiet --flush --return
--command \"%s\" /dev/null"
(detached--session-command session)))
(shell-quote-argument (detached--session-command session)))))
(format "%s %s %s; %s %s" begin-shell-group env command end-shell-group
redirect)))