Variable: ansi-osc-control-seq-regexp
ansi-osc-control-seq-regexp is a variable defined in ansi-osc.el.gz.
Value
"\\][-
]*[ -~]*\\(\\|\\\\\\)"
Documentation
Regexp matching an OSC control sequence.
Source Code
;; Defined in /usr/src/emacs/lisp/ansi-osc.el.gz
;;; ansi-osc.el --- Support for OSC escape sequences -*- lexical-binding: t; -*-
;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
;; Author: Augusto Stoffel <arstoffel@gmail.com>
;; Matthias Meulien <orontee@gmail.com>
;; Maintainer: emacs-devel@gnu.org
;; Keywords: processes, terminals, services
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; Interpretation of OSC (Operating System Commands) escape sequences.
;; Handlers for OSC 2, 7 and 8 (for window title, current directory
;; and hyperlinks respectively) are provided.
;; The function `ansi-osc-compilation-filter' can be added to
;; `compilation-filter-hook' to collect OSC sequences in compilation
;; buffers. The variable `ansi-osc-for-compilation-buffer' tells what
;; to do with collected sequences.
;;; Code:
(defconst ansi-osc-control-seq-regexp
;; See ECMA 48, section 8.3.89 "OSC - OPERATING SYSTEM COMMAND".
"\e\\][\x08-\x0D]*[\x20-\x7E]*\\(\a\\|\e\\\\\\)"
"Regexp matching an OSC control sequence.")