Skip to content

Commit 5f31815

Browse files
committed
formatting
1 parent f1fc3d2 commit 5f31815

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

src/clj_ssh/ssh.clj

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(ns #^{:author "Hugo Duncan"}
22
clj-ssh.ssh
3-
"SSH in clojure. Uses jsch. Provides a ssh function that tries to look similar
4-
to clojure.contrib.shell/sh.
3+
"SSH in clojure. Uses jsch. Provides a ssh function that tries to look
4+
similar to clojure.contrib.shell/sh.
55
66
## Usage
77
@@ -38,13 +38,13 @@ Leiningen (http://github.com/technomancy/leiningen).
3838
3939
Licensed under EPL (http://www.eclipse.org/legal/epl-v10.html)"
4040
(:use
41-
[clojure.contrib.def :only [defvar defunbound]])
41+
[clojure.contrib.def :only [defvar defvar- defunbound]])
4242
(:require
4343
clj-ssh.keychain
4444
[clojure.contrib.logging :as logging])
4545
(:import [com.jcraft.jsch
4646
JSch Session Channel ChannelShell ChannelExec ChannelSftp
47-
Identity IdentityFile Logger]))
47+
Identity IdentityFile Logger KeyPair]))
4848

4949
;; working towards clojure 1.1/1.2 compat
5050
(try
@@ -215,8 +215,9 @@ Licensed under EPL (http://www.eclipse.org/legal/epl-v10.html)"
215215

216216
(defmacro with-ssh-agent
217217
"Bind an ssh-agent for use as identity manager.
218-
The argument vector can be empty, in which case a new agent is created. If passed a String or File, then this is passed to the new agent as an identity to be added.
219-
An existing agent instance can alternatively be passed."
218+
The argument vector can be empty, in which case a new agent is created. If
219+
passed a String or File, then this is passed to the new agent as an identity to
220+
be added. An existing agent instance can alternatively be passed."
220221
[[& agent] & body]
221222
`(binding [*ssh-agent*
222223
~(if (seq agent)
@@ -465,8 +466,11 @@ Options are
465466
1 (. target# (~name (first args#)))
466467
2 (. target# (~name (first args#) (second args#)))
467468
3 (. target# (~name (first args#) (second args#) (nth args# 2)))
468-
4 (. target# (~name (first args#) (second args#) (nth args# 2) (nth args# 3)))
469-
5 (. target# (~name (first args#) (second args#) (nth args# 2) (nth args# 3) (nth args# 4)))
469+
4 (. target#
470+
(~name (first args#) (second args#) (nth args# 2) (nth args# 3)))
471+
5 (. target#
472+
(~name (first args#) (second args#) (nth args# 2) (nth args# 3)
473+
(nth args# 4)))
470474
(throw
471475
(java.lang.IllegalArgumentException.
472476
(str
@@ -545,8 +549,10 @@ Options are
545549
"
546550
[session-or-hostname cmd & args]
547551
(let [opts (parse-args args)
548-
channel-given (instance? com.jcraft.jsch.ChannelSftp session-or-hostname)
549-
session-given (instance? com.jcraft.jsch.Session session-or-hostname)
552+
channel-given (instance?
553+
com.jcraft.jsch.ChannelSftp session-or-hostname)
554+
session-given (instance?
555+
com.jcraft.jsch.Session session-or-hostname)
550556
session (if session-given
551557
session-or-hostname
552558
(if channel-given

0 commit comments

Comments
 (0)