From: Lars Ingebrigtsen Date: Thu, 26 Jan 2017 18:41:56 +0000 (+0100) Subject: Document :shell-command in `make-network-process' X-Git-Tag: emacs-26.0.90~870^2~39 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d32623f040272d9c3bc46b2b1b37c986e7fb8bf1;p=emacs.git Document :shell-command in `make-network-process' * doc/lispref/processes.texi (Network): Document :shell-command. * lisp/net/network-stream.el (open-network-stream): Document the :shell-command parameter (bug#20651). --- diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 014a0aed913..58e04a311a1 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -2414,6 +2414,14 @@ If non-@code{nil}, the host's capability string. The connection type: @samp{plain} or @samp{tls}. @end table +@item :shell-command @var{string-or-nil} +If the connection @code{type} is @code{shell}, this parameter will be +interpreted as a format-spec string that will be executed to make the +connection. The specs available are @samp{%s} for the host name and +@samp{%p} for the port number. For instance, if you want to first ssh +to @samp{gateway} before making a plain connection, then this +parameter could be something like @samp{ssh gateway nc %s %p}. + @end table @end defun diff --git a/lisp/net/network-stream.el b/lisp/net/network-stream.el index 93e1bae5fc2..bf60eee673c 100644 --- a/lisp/net/network-stream.el +++ b/lisp/net/network-stream.el @@ -139,6 +139,10 @@ a greeting from the server. :nowait, if non-nil, says the connection should be made asynchronously, if possible. +:shell-command is a format-spec string that can be used if :type +is `shell'. It has two specs, %s for host and %p for port +number. Example: \"ssh gateway nc %s %p\". + :tls-parameters is a list that should be supplied if you're opening a TLS connection. The first element is the TLS type (either `gnutls-x509pki' or `gnutls-anon'), and the