Function: nrepl--ssh-tunnel-command
nrepl--ssh-tunnel-command is a byte-compiled function defined in
nrepl-client.el.
Signature
(nrepl--ssh-tunnel-command SSH DIR PORT)
Documentation
Command string to open SSH tunnel to the host associated with DIR's PORT.
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/nrepl-client.el
(defun nrepl--ssh-tunnel-command (ssh dir port)
"Command string to open SSH tunnel to the host associated with DIR's PORT."
(with-parsed-tramp-file-name dir v
;; this abuses the -v option for ssh to get output when the port
;; forwarding is set up, which is used to synchronise on, so that
;; the port forwarding is up when we try to connect.
(format-spec
"%s -v -N -L %p:localhost:%p %u'%h' %n"
`((?s . ,ssh)
(?p . ,port)
(?h . ,v-host)
(?u . ,(if v-user (format "-l '%s' " v-user) ""))
(?n . ,(if v-port (format "-p '%s' " v-port) ""))))))