Function: ghostel-paste-string

ghostel-paste-string is a natively compiled function defined in ghostel.el.

Signature

(ghostel-paste-string STRING)

Documentation

Send STRING to the terminal using bracketed paste.

Signals a user-error when called outside a ghostel buffer.

Unlike ghostel-send-string, this wraps STRING in bracketed paste markers (ESC [200~ / ESC [201~) when the terminal supports bracketed paste mode (mode 2004), so the shell treats the input as an atomic paste rather than character-by-character typed keystrokes.

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defun ghostel-paste-string (string)
  "Send STRING to the terminal using bracketed paste.
Signals a `user-error' when called outside a ghostel buffer.

Unlike `ghostel-send-string', this wraps STRING in bracketed paste
markers (ESC [200~ / ESC [201~) when the terminal supports bracketed
paste mode (mode 2004), so the shell treats the input as an atomic
paste rather than character-by-character typed keystrokes."
  (ghostel--ensure-ghostel-buffer)
  (ghostel--on-user-input)
  (ghostel--paste-text string))