diff options
| author | Jim Porter | 2025-01-11 11:50:19 -0800 |
|---|---|---|
| committer | Jim Porter | 2025-01-11 11:50:19 -0800 |
| commit | aff9261ab2ab3cf3435cf006e600a575bc2e3d6b (patch) | |
| tree | 930d02d067aee4e990d9586fcd44ecff55208cac | |
| parent | 3d375ced1f22fcd3b370d715ffdd055684bce5ac (diff) | |
| download | emacs-aff9261ab2ab3cf3435cf006e600a575bc2e3d6b.tar.gz emacs-aff9261ab2ab3cf3435cf006e600a575bc2e3d6b.zip | |
Make Eshell's "ls" command return a non-zero status on errors
* lisp/eshell/em-ls.el (eshell/ls): Set exit code when calling 'error-func'.
| -rw-r--r-- | lisp/eshell/em-ls.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index ce2e6ab7d60..52a330a3353 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el | |||
| @@ -329,7 +329,7 @@ instead." | |||
| 329 | "An alias version of `eshell-do-ls'." | 329 | "An alias version of `eshell-do-ls'." |
| 330 | (eshell-with-buffered-print | 330 | (eshell-with-buffered-print |
| 331 | (let ((insert-func #'eshell-buffered-print) | 331 | (let ((insert-func #'eshell-buffered-print) |
| 332 | (error-func #'eshell-error)) | 332 | (error-func (lambda (s) (eshell-error s) (eshell-set-exit-info 2)))) |
| 333 | (apply 'eshell-do-ls args)))) | 333 | (apply 'eshell-do-ls args)))) |
| 334 | 334 | ||
| 335 | (put 'eshell/ls 'eshell-no-numeric-conversions t) | 335 | (put 'eshell/ls 'eshell-no-numeric-conversions t) |