Function: clipetty--dcs-wrap

clipetty--dcs-wrap is a natively compiled function defined in clipetty.el.

Signature

(clipetty--dcs-wrap STRING TMUX TERM SSH-TTY)

Documentation

Return STRING wrapped in an appropriate DCS if necessary.

The arguments TMUX, TERM, and SSH-TTY should come from the selected frame's environment.

Source Code

;; Defined in /nix/store/7jgingzby054id3d9x64ir7i7a509mkl-emacs-packages-deps/share/emacs/site-lisp/elpa/clipetty-20200327.2241/clipetty.el
(defun clipetty--dcs-wrap (string tmux term ssh-tty)
  "Return STRING wrapped in an appropriate DCS if necessary.
The arguments TMUX, TERM, and SSH-TTY should come from the selected
frame's environment."
  (let* ((screen (if term (string-match-p clipetty-screen-regexp term) nil))
         (dcs
          (cond (screen (clipetty--make-dcs string t))
                (tmux   (clipetty--make-dcs string))
                (t      string))))
    (if ssh-tty (if clipetty-assume-nested-mux dcs string) dcs)))