I would like to suggest adding some (optional) support for "Operating System Commands" [1] to comint. (This is unrelated to having Emacs talk OSC codes with the terminal inside of which its running.) This class of control sequences serves various random purposes, for instance adding clickable hyperlinks in terminal applications. As an example, compare `ls --hyperlink' in the Emacs shell versus some other "modern" terminal emulator. Now, I don't particularly care about those hyperlinks or any other established use of OSC sequences, and I guess a well-made program will avoid outputting them to Emacs, since it advertises itself as a dumb terminal. But OSCs seem to be good a way to create ad-hoc communication protocols between Emacs and other programs, say to display images in a REPL buffer (see [3] for a precedent). Thus, concretely, the suggestion is to add the `comint-osc-process-output' function attached below to comint.el or some other appropriate place. It would not be added to `comint-output-filter-functions' by default. The hyperlink handler is added as an example, it might be kept or removed. Anyway, as an illustration, after evaluating the attached file and calling (add-hook 'comint-output-filter-functions 'comint-osc-process-output nil t) in a shell buffer, `ls --hyperlink' should produce clickable hyperlinks, as it does in other capable terminals. What do you think?