emacs-pe / docker-tramp.el

TRAMP integration for docker containers
340 stars 25 forks source link

Offer "names" completion as well as SHA IDs #2

Closed Silex closed 9 years ago

Silex commented 9 years ago

Hello,

This plugin is amazing! I'll probably make docker.el support "open file in container" through it, or maybe even M-x shell over TRAMP that way.

Anyway, my request is fairly simple, when you have this:

CONTAINER ID        IMAGE                       COMMAND                CREATED             STATUS              PORTS                                      NAMES
bbd4f62e9f1d        sameersbn/redmine:3.0.3-1   "/app/init app:start   5 minutes ago       Up 35 seconds       0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   redmine-www-3.0.3-1   
24dbb476cdd8        sameersbn/mysql:latest      "/start"               6 minutes ago       Up 6 minutes        3306/tcp                                   redmine-db

It'd be nice if it completed redmine-db and redmine-www-3.0.3-1 as well as the numerical SHA1.

marsam commented 9 years ago

Hi: Sorry for the late response. I didn't know you can use container names. I've pushed a change to use container names you need to add (setq docker-tramp-use-names t) to your init.el

This plugin is amazing! I'll probably make docker.el support "open file in container" through it, or maybe even M-x shell over TRAMP that way.

Thanks, iirc shell doesn't work well with tramp, but eshell have tramp support.

Silex commented 9 years ago

Thanks, iirc shell doesn't work well with tramp, but eshell have tramp support.

Well, in my experience shell has the best TRAMP experience because you can cd /etc and be in the correct directory. With eshell you end up in your own /etc, and you need to cd /scpx:root@foo:/etc

M-x term has no TRAMP support at all.

Silex commented 9 years ago

Ok your patch works fine :+1:

Thank you!

The TRAMP autoload doesn't seem to work tho... any idea? I always have to load-library docker-tramp before being able to C-x C-f /docker:foobar

marsam commented 9 years ago

The TRAMP autoload doesn't seem to work tho... any idea? I always have to load-library docker-tramp before being able to C-x C-f /docker:foobar

That is weird :/, can you share your configuration?