diff options
| -rw-r--r-- | lisp/eshell/em-term.el | 2 | ||||
| -rw-r--r-- | lisp/eshell/esh-io.el | 20 |
2 files changed, 15 insertions, 7 deletions
diff --git a/lisp/eshell/em-term.el b/lisp/eshell/em-term.el index a4fa699aa90..6811e703137 100644 --- a/lisp/eshell/em-term.el +++ b/lisp/eshell/em-term.el | |||
| @@ -153,7 +153,7 @@ behavior for short-lived processes, see bug#18108." | |||
| 153 | If either COMMAND or a subcommand in ARGS (e.g. git log) is a | 153 | If either COMMAND or a subcommand in ARGS (e.g. git log) is a |
| 154 | visual command, returns non-nil." | 154 | visual command, returns non-nil." |
| 155 | (let ((command (file-name-nondirectory command))) | 155 | (let ((command (file-name-nondirectory command))) |
| 156 | (and (eshell-interactive-output-p) | 156 | (and (eshell-interactive-output-p 'all) |
| 157 | (or (member command eshell-visual-commands) | 157 | (or (member command eshell-visual-commands) |
| 158 | (member (car args) | 158 | (member (car args) |
| 159 | (cdr (assoc command eshell-visual-subcommands))) | 159 | (cdr (assoc command eshell-visual-subcommands))) |
diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index f5dac2c81cd..01e8aceeabd 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el | |||
| @@ -407,12 +407,20 @@ it defaults to `insert'." | |||
| 407 | (error "Invalid redirection target: %s" | 407 | (error "Invalid redirection target: %s" |
| 408 | (eshell-stringify target))))) | 408 | (eshell-stringify target))))) |
| 409 | 409 | ||
| 410 | (defun eshell-interactive-output-p () | 410 | (defun eshell-interactive-output-p (&optional index handles) |
| 411 | "Return non-nil if current handles are bound for interactive display." | 411 | "Return non-nil if the specified handle is bound for interactive display. |
| 412 | (and (eq (car (aref eshell-current-handles | 412 | HANDLES is the set of handles to check; if nil, use |
| 413 | eshell-output-handle)) t) | 413 | `eshell-current-handles'. |
| 414 | (eq (car (aref eshell-current-handles | 414 | |
| 415 | eshell-error-handle)) t))) | 415 | INDEX is the handle index to check. If nil, check |
| 416 | `eshell-output-handle'. If `all', check both | ||
| 417 | `eshell-output-handle' and `eshell-error-handle'." | ||
| 418 | (let ((handles (or handles eshell-current-handles)) | ||
| 419 | (index (or index eshell-output-handle))) | ||
| 420 | (if (eq index 'all) | ||
| 421 | (and (eq (car (aref handles eshell-output-handle)) t) | ||
| 422 | (eq (car (aref handles eshell-error-handle)) t)) | ||
| 423 | (eq (car (aref handles index)) t)))) | ||
| 416 | 424 | ||
| 417 | (defvar eshell-print-queue nil) | 425 | (defvar eshell-print-queue nil) |
| 418 | (defvar eshell-print-queue-count -1) | 426 | (defvar eshell-print-queue-count -1) |