[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/dtache c7d44ea2ea 2/3: Make dtache use the correct comm
From: |
ELPA Syncer |
Subject: |
[elpa] externals/dtache c7d44ea2ea 2/3: Make dtache use the correct command syntax for fish |
Date: |
Sun, 20 Mar 2022 05:57:28 -0400 (EDT) |
branch: externals/dtache
commit c7d44ea2ea78bbca87bf198bf1e7d9ec067a8f2c
Author: Rose Osterheld <dev@roeli.org>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Make dtache use the correct command syntax for fish
Fish uses `begin; ... end` instead of `{ ... }` for grouping, so if
dtache is using fish shell we need to change the syntax.
---
dtache.el | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/dtache.el b/dtache.el
index c8df245319..c1e79c6a69 100644
--- a/dtache.el
+++ b/dtache.el
@@ -71,8 +71,8 @@
:type 'string
:group 'dtache)
-(defcustom dtache-shell-program shell-file-namue
- "Shell to run the dtach command in."
+(defcustom dtache-shell-program shell-file-name
+ "Path to the shell to run the dtach command in."
:type 'string
:group 'dtache)
@@ -1094,6 +1094,12 @@ Optionally make the path LOCAL to host."
If SESSION is nonattachable fallback to a command that doesn't rely on tee."
(let* ((log (dtache--session-file session 'log t))
+ (begin-shell-group (if (string= "fish" (file-name-nondirectory
dtache-shell-program))
+ "begin;"
+ "{"))
+ (end-shell-group (if (or (string= "fish" (file-name-nondirectory
dtache-shell-program)))
+ "end"
+ "}"))
(redirect
(if (dtache--session-attachable session)
(format "2>&1 | tee %s" log)
@@ -1102,7 +1108,7 @@ If SESSION is nonattachable fallback to a command that
doesn't rely on tee."
(command
(shell-quote-argument
(dtache--session-command session))))
- (format "{ %s %s; } %s" env command redirect)))
+ (format "%s %s %s; %s %s" begin-shell-group env command end-shell-group
redirect)))
(defun dtache--host ()
"Return a cons with (host . type)."