eshell-virtual-targets
eshell-virtual-targets is a variable defined in `
esh-io.el
'.
Its value is shown
below.
- This variable may be risky if used as a file-local variable.
Documentation:
Map virtual devices name to Emacs Lisp functions.
If the user specifies any of the filenames above as a redirection
target, the function in the second element will be called.
If the third element is non-nil, the redirection mode is passed as an
argument (which is the symbol `overwrite', `append' or `insert'), and
the function is expected to return another function -- which is the
output function. Otherwise, the second element itself is the output
function.
The output function is then called repeatedly with single strings,
which represents successive pieces of the output of the command, until nil
is passed, meaning EOF.
NOTE: /dev/null is handled specially as a virtual target, and should
not be added to this variable.
You can customize this variable.
Value:
(("/dev/eshell" eshell-interactive-print nil)
("/dev/kill"
(lambda
(mode)
(if
(eq mode 'overwrite)
(kill-new ""))
'eshell-kill-append)
t)
("/dev/clip"
(lambda
(mode)
(if
(eq mode 'overwrite)
(let
((gui-select-enable-clipboard t))
(kill-new "")))
'eshell-clipboard-append)
t))