Function: nrepl--ssh-tunnel-filter

nrepl--ssh-tunnel-filter is a byte-compiled function defined in nrepl-client.el.

Signature

(nrepl--ssh-tunnel-filter PROC STRING)

Documentation

Process filter for the ssh tunnel PROC handling STRING.

Echo ssh's output into the tunnel buffer and answer password prompts.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/nrepl-client.el
(defun nrepl--ssh-tunnel-filter (proc string)
  "Process filter for the ssh tunnel PROC handling STRING.
Echo ssh's output into the tunnel buffer and answer password prompts."
  (when (and (process-live-p proc)
             (buffer-live-p (process-buffer proc)))
    (with-current-buffer (process-buffer proc)
      (let ((moving (= (point) (process-mark proc))))
        (save-excursion
          (goto-char (process-mark proc))
          (insert string)
          (set-marker (process-mark proc) (point))
          (comint-watch-for-password-prompt string))
        (if moving (goto-char (process-mark proc)))))))