-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add proper completion with TRAMP multi-hops #17
Comments
I've tried to rewrite function for suggestions using (defun docker-tramp--running-containers ()
"Collect docker running containers.
Return a list of containers of the form: \(ID NAME\)"
(let* ((args (append docker-tramp-docker-options
(list "ps" "--format" "{{.ID}}:{{.Names}}")))
(ps (ignore-errors
(with-output-to-string
(apply #'process-file docker-tramp-docker-executable nil standard-output nil args))))
(lines (split-string ps))
(split-by-collon (lambda (str) (split-string str ":"))))
(mapcar split-by-collon lines))) full source - https://github.com/olessavluk/docker-tramp.el/blob/multi-hops/docker-tramp.el#L101 But with this changes, when I use multi-hops syntax I still see my local containers. And after I open some file or a dired buffer using Maybe I can somehow get currently entered value e.g. |
Hi, sorry for the late response. I remember also trying to make this work. I patched I'll try to check this again this weekend, you can also ask in the tramp mailing list btw. |
Any update on this function? |
Hello @stardiviner, As a temporary workaround I'm using my fork olessavluk/docker-tramp branch:multi-hops. It is aware of the TRAMP but not aware of the multi-hops (as I've describe previously). In order to use it:
|
@olessavluk Thanks. |
Hi @olessavluk, Can you make a PR? It is better than current behavior anyway. It is quite common to open a dired buffer or file on a remote host (e.g. via bookmark) and then add hop to the path. |
Hi,
I did exactly that by using |
Hi,
When I use TRAMP multi-hops syntax, for example
/ssh:example.com|docker:
in the suggestions, I see the list of my local containers, but would like to see the remote one (from example.com).Is it possible to make suggestions that use remote docker?
The text was updated successfully, but these errors were encountered: