summaryrefslogtreecommitdiff
path: root/doc/emacs/misc.texi
diff options
context:
space:
mode:
authorAugusto Stoffel <arstoffel@gmail.com>2021-08-25 12:29:22 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2021-08-25 12:29:22 +0200
commit630a13ac4631866889bab1177e06ca1d693708c1 (patch)
tree381174fe8e85946af5d636061d7c0a6619bf4eb0 /doc/emacs/misc.texi
parent64b4c85637d9d5aa98ddc4f006f24cbd28727416 (diff)
downloademacs-630a13ac4631866889bab1177e06ca1d693708c1.tar.gz
Add support for OSC escape codes in comint
* doc/emacs/misc.texi (Shell Mode): Document it. * lisp/comint.el (comint-osc-handlers, comint-osc--marker): New variables. (comint-osc-process-output): New function. (comint-osc-hyperlink-map): New map. (comint-osc-hyperlink-handler): New function.
Diffstat (limited to 'doc/emacs/misc.texi')
-rw-r--r--doc/emacs/misc.texi13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 528cfa94c66..47e3e11d339 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -1113,6 +1113,19 @@ subshell:
@end example
@end table
+By default, Shell mode handles common @acronym{ANSI} escape codes (for
+instance, for changing the color of text). Emacs also optionally
+supports some extend escape codes, like some of the @acronym{OSC}
+(Operating System Codes) if you put the following in your init file:
+
+@lisp
+(add-hook 'comint-output-filter-functions 'comint-osc-process-output)
+@end lisp
+
+With this enabled, the output from, for instance, @code{ls
+--hyperlink} will be made into clickable buttons in the Shell mode
+buffer.
+
@cindex Comint mode
@cindex mode, Comint
Shell mode is a derivative of Comint mode, a general-purpose mode for