This is so that users can type "cmd ... > /dev/null" in Eshell no
matter what their system's null device is called. (Users can still
use their system's null device name when redirecting, too. Eshell
doesn't need to do anything special to support that.) This partially
reverts
67a8bdb90c9b5865b7f17290c7135b1a5458c36d. See bug#59545.
Do not merge to master.
* lisp/eshell/esh-io.el (eshell-set-output-handle): Use "/dev/null"
literally.
(when target
(let ((handles (or handles eshell-current-handles)))
(if (and (stringp target)
- (string= target (null-device)))
+ ;; The literal string "/dev/null" is intentional here.
+ ;; It just provides compatibility so that users can
+ ;; redirect to "/dev/null" no matter the actual value
+ ;; of `null-device'.
+ (string= target "/dev/null"))
(aset handles index nil)
(let ((where (eshell-get-target target mode))
(current (car (aref handles index))))