emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/dtache c1f3b629b8 01/14: Update README


From: ELPA Syncer
Subject: [elpa] externals/dtache c1f3b629b8 01/14: Update README
Date: Fri, 13 May 2022 11:57:47 -0400 (EDT)

branch: externals/dtache
commit c1f3b629b8d55a5ef3f69fed498c702d0485fa03
Author: Rose Osterheld <dev@roeli.org>
Commit: Niklas Eklund <niklas.eklund@posteo.net>

    Update README
    
    Document a hack to make programs assume that dtache has color support
---
 README.org | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/README.org b/README.org
index 2eb0a08cea..6340ca245f 100644
--- a/README.org
+++ b/README.org
@@ -451,6 +451,32 @@ The 
[[https://github.com/stsquad/dired-rsync][dired-rsync]] is a package to run
 
 The above code block shows how to make =dired-rsync= use =dtache=.
 
+*** Enable more colors in output
+
+Many programs such as =git= or =grep= don't show colors in dtache unless they 
are forced to. This is because these commands only use colors and ansi 
sequences if they are being run in a terminal as opposed to a pipe. This lets 
you get color output when you are running these programs interactively while 
still getting readable output when you are piping them or redirecting them to a 
logfile. =Dtache= does not run programs in interactive terminal, though, so 
these commands turn off their co [...]
+
+*WARNING:* =Dtache= only supports a few basic escape sequences, so this fix 
/will/ mess up the output for some commands.
+
+First, put the following script into an executable file:
+
+#+begin_src sh :results none
+#!/usr/bin/env bash
+
+dtache_command="$*"
+
+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
+#+end_src
+
+Then, add the following to your =init.el=
+
+#+begin_src elisp :lexical t :results none
+  (setq dtache-env "/path/to/file")
+#+end_src
+
 * Versions
 
 Information about larger changes that has been made between versions can be 
found in the =CHANGELOG.org=



reply via email to

[Prev in Thread] Current Thread [Next in Thread]