[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dtache 19f13e25d5 02/14: new-dtache-env
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dtache 19f13e25d5 02/14: new-dtache-env |
Date: |
Fri, 13 May 2022 11:57:47 -0400 (EDT) |
branch: externals/dtache
commit 19f13e25d567861c386e9d33da3ff10539103834
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
new-dtache-env
---
dtache-env | 21 ++++++++++++++++-----
dtache.el | 5 +++--
2 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/dtache-env b/dtache-env
index 27726c2540..18011e8f07 100755
--- a/dtache-env
+++ b/dtache-env
@@ -1,9 +1,20 @@
#!/usr/bin/env bash
-dtache_command="$*"
+mode="$1"
+shift
+dtache_command="$@"
-if eval "$dtache_command"; then
- echo -e "\nDtache session finished"
-else
- echo -e "\nDtache session exited abnormally with code $?"
+if [ "$mode" = "dumb" ]; then
+ if eval "$dtache_command"; then
+ echo -e "\nDtache session finished"
+ else
+ echo -e "\nDtache session exited abnormally with code $?"
+ fi
+elif [ "$mode" = "smart" ]; then
+ TERM="eterm-color"
+ if eval script --quiet -f -e -c "\"$dtache_command\"" /dev/null; then
+ echo -e "\nDtache session finished"
+ else
+ echo -e "\nDtache session exited abnormally with code $?"
+ fi
fi
diff --git a/dtache.el b/dtache.el
index 802eee6538..9483e7f424 100644
--- a/dtache.el
+++ b/dtache.el
@@ -1125,8 +1125,9 @@ If SESSION is nonattachable fallback to a command that
doesn't rely on tee."
(format "&> %s" log)))
(env (if dtache-env dtache-env (format "%s -c" dtache-shell-program)))
(command
- (shell-quote-argument
- (dtache--session-command session))))
+ (if dtache-env
+ (concat "smart " (shell-quote-argument (dtache--session-command
session)))
+ (shell-quote-argument (dtache--session-command session)))))
(format "%s %s %s; %s %s" begin-shell-group env command end-shell-group
redirect)))
(defun dtache--host ()
- [elpa] externals/dtache updated (5a39733299 -> 04f27090ae), ELPA Syncer, 2022/05/13
- [elpa] externals/dtache 19f13e25d5 02/14: new-dtache-env,
ELPA Syncer <=
- [elpa] externals/dtache 60ec4c26d1 03/14: Add smart-mode-block-list, ELPA Syncer, 2022/05/13
- [elpa] externals/dtache d34c6cb023 10/14: Delete README.org, ELPA Syncer, 2022/05/13
- [elpa] externals/dtache c1f3b629b8 01/14: Update README, ELPA Syncer, 2022/05/13
- [elpa] externals/dtache 0f3dce2191 04/14: Fix tests, ELPA Syncer, 2022/05/13
- [elpa] externals/dtache 7f07d2ddd3 06/14: Add missing autoload cookie, ELPA Syncer, 2022/05/13
- [elpa] externals/dtache 2764a29989 08/14: Update dtache-env-mode, ELPA Syncer, 2022/05/13
- [elpa] externals/dtache 7311bcaac8 09/14: Update dtache-env-mode implementation, ELPA Syncer, 2022/05/13
- [elpa] externals/dtache 5087f90120 12/14: Update CHANGELOG, ELPA Syncer, 2022/05/13
- [elpa] externals/dtache 80d019e595 05/14: Address suggestion from linter, ELPA Syncer, 2022/05/13
- [elpa] externals/dtache d0c5522c9e 07/14: Update README.md, ELPA Syncer, 2022/05/13