summaryrefslogtreecommitdiff
path: root/.emacs.d/eshell
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-12-04 17:50:42 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-12-04 22:39:57 -0700
commitf26345f0a6056d695902ec17c11ad1fb8387c5dc (patch)
treed5e700d0d56ad25c806de29364b3e3ebed7bc4c8 /.emacs.d/eshell
parent0375c8aa2444577dae62e6360198a6ffd67d40bf (diff)
downloaddotfiles-f26345f0a6056d695902ec17c11ad1fb8387c5dc.tar.gz
use aliases to obtain coloured output from git & quilt in Eshell
Diffstat (limited to '.emacs.d/eshell')
-rw-r--r--.emacs.d/eshell/alias7
-rw-r--r--.emacs.d/eshell/profile4
2 files changed, 7 insertions, 4 deletions
diff --git a/.emacs.d/eshell/alias b/.emacs.d/eshell/alias
index d4d552bd..dacbdef3 100644
--- a/.emacs.d/eshell/alias
+++ b/.emacs.d/eshell/alias
@@ -16,3 +16,10 @@ alias pdfwords pdftotext "$1" - | wc -w
alias tail-dak { cd /ssh:ftp-master.debian.org:/srv/ftp-master.debian.org/log && tail -f current }
alias tail-queued { cd /ssh:ssh.upload.debian.org:/srv/upload.debian.org/queued/run && tail -f log }
alias package-plan-unpack ~/src/dotfiles/scripts/debian/package-plan-unpack "$1"; cd "/tmp/$1"
+
+# Override ~/.config/git/config and ~/.profile whose settings imply colours
+# only when output is a tty, which it isn't with Eshell.
+# We could just export the environment variables, but this should restrict the
+# colouration to commands run interactively, not others buried in scripts.
+alias git git -c color.ui=always $*
+alias quilt QUILT_DIFF_ARGS="-p ab --color=always" QUILT_PUSH_ARGS="--refresh --color=always" quilt $*
diff --git a/.emacs.d/eshell/profile b/.emacs.d/eshell/profile
index d0895b3a..dccfc2b2 100644
--- a/.emacs.d/eshell/profile
+++ b/.emacs.d/eshell/profile
@@ -6,7 +6,3 @@ export VISUAL="$EDITOR"
# debconf will fall back to this frontend but emit a warning; set it ourselves
# to avoid that warning
export DEBIAN_FRONTEND=readline
-
-# --color=auto -> --color=always
-export QUILT_DIFF_ARGS="-p ab --color=always"
-export QUILT_PUSH_ARGS="--refresh --color=always"