diff mbox series

[bug#36404,1/5] ssh: Add 'identity' keyword to 'open-ssh-session'.

Message ID 87ef3dj0j9.fsf_-_@sdf.lonestar.org
State Accepted
Headers show
Series Add 'guix deploy'. | expand

Commit Message

Jakob L. Kreuze June 28, 2019, 1:35 p.m. UTC
* guix/ssh.scm (open-ssh-session): Add 'identity' keyword argument.
---
 guix/ssh.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Christine Lemmer-Webber June 29, 2019, 2:42 p.m. UTC | #1
Jakob L. Kreuze writes:

> * guix/ssh.scm (open-ssh-session): Add 'identity' keyword argument.
> ---
>  guix/ssh.scm | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/guix/ssh.scm b/guix/ssh.scm
> index 9b9baf54ea..a2387564a4 100644
> --- a/guix/ssh.scm
> +++ b/guix/ssh.scm
> @@ -57,12 +57,13 @@
>  (define %compression
>    "zlib@openssh.com,zlib")
>  
> -(define* (open-ssh-session host #:key user port
> +(define* (open-ssh-session host #:key user port identity
>                             (compression %compression))
>    "Open an SSH session for HOST and return it.  When USER and PORT are #f, use
>  default values or whatever '~/.ssh/config' specifies; otherwise use them.
>  Throw an error on failure."

Looks good, but could you add to the docstring here explaining the new
identity keyword?

>    (let ((session (make-session #:user user
> +                               #:identity identity
>                                 #:host host
>                                 #:port port
>                                 #:timeout 10       ;seconds
Jakob L. Kreuze June 29, 2019, 11:45 p.m. UTC | #2
Christopher Lemmer Webber <cwebber@dustycloud.org> writes:

> Looks good, but could you add to the docstring here explaining the new
> identity keyword?

Added, thanks!
diff mbox series

Patch

diff --git a/guix/ssh.scm b/guix/ssh.scm
index 9b9baf54ea..a2387564a4 100644
--- a/guix/ssh.scm
+++ b/guix/ssh.scm
@@ -57,12 +57,13 @@ 
 (define %compression
   "zlib@openssh.com,zlib")
 
-(define* (open-ssh-session host #:key user port
+(define* (open-ssh-session host #:key user port identity
                            (compression %compression))
   "Open an SSH session for HOST and return it.  When USER and PORT are #f, use
 default values or whatever '~/.ssh/config' specifies; otherwise use them.
 Throw an error on failure."
   (let ((session (make-session #:user user
+                               #:identity identity
                                #:host host
                                #:port port
                                #:timeout 10       ;seconds