Compare commits
4 Commits
a2e7164bfd
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
94104e4a79
|
|||
|
7bfca66aa5
|
|||
|
5f3ee4643d
|
|||
|
83862b8d03
|
+5
-4
@@ -15,10 +15,11 @@ similarly to how it is implemented for Docker, Podman, and other programs.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package incus-tramp
|
||||
:ensure t
|
||||
:after tramp :vc (incus-tramp :url https://github.com/mdnight/incus-tramp.git
|
||||
:branch main)
|
||||
:config (incus-tramp-enable-method))
|
||||
:after tramp
|
||||
:vc (incus-tramp :url "https://github.com/mdnight/incus-tramp.git"
|
||||
:rev "v0.1.0")
|
||||
:config
|
||||
(incus-tramp-enable-method))
|
||||
#+end_src
|
||||
|
||||
** Usage
|
||||
|
||||
+7
-8
@@ -46,14 +46,14 @@
|
||||
|
||||
(defgroup incus-tramp nil
|
||||
"TRAMP integration for Incus."
|
||||
:group 'tramp)
|
||||
:group 'tramp
|
||||
:prefix "incus-tramp-")
|
||||
|
||||
(defcustom incus-tramp-incus-program "incus"
|
||||
"Path to the Incus executable."
|
||||
(defcustom incus-tramp-program "incus"
|
||||
"The executable name for Incus CLI"
|
||||
:type 'string
|
||||
:group 'incus-tramp)
|
||||
|
||||
;;;###autoload
|
||||
(defconst incus-tramp-method "incus"
|
||||
"Tramp method name to connect to Incus containers.")
|
||||
|
||||
@@ -64,15 +64,14 @@
|
||||
(names (split-string raw-list "\n" 'omit)))
|
||||
(mapcar (lambda (name) (list nil name)) names))))
|
||||
|
||||
;;;###autoload
|
||||
(defun incus-tramp-enable-method ()
|
||||
(with-eval-after-load 'tramp
|
||||
(add-to-list 'tramp-methods
|
||||
`(,incus-tramp-method
|
||||
(tramp-login-program ,incus-tramp-incus-program)
|
||||
(tramp-login-program ,incus-tramp-program)
|
||||
(tramp-login-args (("exec") ("%h") (,(format "--env TERM=%s" tramp-terminal-type)) ("--") ("%l")))
|
||||
(tramp-direct-async (,tramp-default-remote-shell "-c"))
|
||||
(tramp-remote-shell ,tramp-default-remote-shell)
|
||||
(tramp-direct-async "/bin/sh")
|
||||
(tramp-remote-shell "/bin/sh")
|
||||
(tramp-remote-shell-login ("-l"))
|
||||
(tramp-remote-shell-args ("-i" "-c"))
|
||||
(tramp-completion-use-cache nil)
|
||||
|
||||
Reference in New Issue
Block a user