emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master fbf27afb6a: Adapt Tramp manual


From: Michael Albinus
Subject: master fbf27afb6a: Adapt Tramp manual
Date: Wed, 13 Apr 2022 10:40:42 -0400 (EDT)

branch: master
commit fbf27afb6a08c7315c0d1e787d83fc529fcb6260
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    Adapt Tramp manual
    
    * doc/misc/tramp.texi (Ssh setup): New subsection "Using ssh
    config include for host name completion".  (Bug#54885)
    Precise, that list-system-processes and process-attributes are
    about system processes.
---
 doc/misc/tramp.texi | 44 +++++++++++++++++++++++++++++++++++++-------
 1 file changed, 37 insertions(+), 7 deletions(-)

diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 3cc312d2f5..4f4e78061e 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -2643,10 +2643,40 @@ where @samp{192.168.0.1} is the remote host IP address
 @node Ssh setup
 @section Ssh setup hints
 
-The most common @value{tramp} connection family is based on either
-@command{ssh} or @command{scp} of OpenSSH, or @command{plink} or
-@command{pscp} of PuTTY on MS Windows.  In the following, some
-configuration recommendations are given.
+
+@subsection Using ssh config include for host name completion
+
+@vindex Include@r{, ssh option}
+@findex tramp-set-completion-function
+@findex tramp-get-completion-function
+OpenSSH configuration files can use an @option{Include} option for
+further configuration files.  Default @value{tramp} host name
+completion ignores this option.  However, you can configure this
+yourself.
+
+Given, your @file{~/.ssh/config} file contains the following option:
+
+@example
+Include ~/.ssh/conf.d/*
+@end example
+
+The following code snippet in your @file{.emacs} uses all files in
+that directory for host name completion:
+
+@lisp
+@group
+(tramp-set-completion-function
+ "ssh" (append (tramp-get-completion-function "ssh")
+               (mapcar (lambda (file) `(tramp-parse-sconfig ,file))
+                       (directory-files
+                        "~/.ssh/conf.d/"
+                        'full directory-files-no-dot-files-regexp))))
+@end group
+@end lisp
+
+This code snippet does it for the @option{ssh} method.  If you replace
+@t{"ssh"} by @t{"scp"}, it does it also for that method (or any other
+method you like).
 
 
 @subsection Detection of session hangouts
@@ -4041,9 +4071,9 @@ inspect @value{tramp} @ref{Traces and Profiles, traces}.
 @findex list-system-processes
 @findex process-attributes
 The functions @code{list-system-processes} and
-@code{process-attributes} return information about processes on the
-respective remote host.  In order to retrieve this information, they
-use the command @command{ps}, driven by the following constants:
+@code{process-attributes} return information about system processes on
+the respective remote host.  In order to retrieve this information,
+they use the command @command{ps}, driven by the following constants:
 
 @defvr Constant tramp-process-attributes-ps-args
 This is a list of arguments (strings) @command{ps} is called with.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]