From 04fcf1b047a388b2fb995dbedf635238faca7a58 Mon Sep 17 00:00:00 2001 From: Aidan Gauland Date: Sun, 9 Jun 2013 18:44:47 +1200 Subject: [PATCH] Fix Eshell bug * eshell/em-term.el (eshell-visual-command-p): Fix bug that causedoutput redirection to be ignored with visual commands. --- lisp/ChangeLog | 5 +++++ lisp/eshell/em-term.el | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 31746dd8de2..b7173c5cacf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2013-06-09 Aidan Gauland + * eshell/em-term.el (eshell-visual-command-p): Fix bug that caused + output redirection to be ignored with visual commands. + +2013-06-09 Aidan Gauland + * eshell/em-term.el (eshell-visual-command-p): New function. (eshell-term-initialize): Move long lambda to separate function eshell-visual-command-p. * eshell/em-dirs.el (eshell-dirs-initialise): Add missing #' to lambda. diff --git a/lisp/eshell/em-term.el b/lisp/eshell/em-term.el index 1ed584df882..1d4b2a59d4b 100644 --- a/lisp/eshell/em-term.el +++ b/lisp/eshell/em-term.el @@ -141,12 +141,13 @@ character to the invoked process." If either COMMAND or a subcommand in ARGS (e.g. git log) is a visual command, returns non-nil." (let ((command (file-name-nondirectory command))) - (or (member command eshell-visual-commands) - (member (car args) - (cdr (assoc command eshell-visual-subcommands))) - (cl-intersection args - (cdr (assoc command eshell-visual-options)) - :test 'string=)))) + (and (eshell-interactive-output-p) + (or (member command eshell-visual-commands) + (member (car args) + (cdr (assoc command eshell-visual-subcommands))) + (cl-intersection args + (cdr (assoc command eshell-visual-options)) + :test 'string=))))) (defun eshell-exec-visual (&rest args) "Run the specified PROGRAM in a terminal emulation buffer. -- 2.11.4.GIT