Michael Albinus <[email protected]> writes: > Daniel Kraus <[email protected]> writes: > >> Then you can "lcd /" and you would end up in "/plinkx:Eval:/".
Thank you Daniel for this idea, I now understand the concept of eshell better. > Or > > (defun eshell/lcd (&optional directory) > "Like regular 'cd' but don't jump out of a tramp directory. > When on a remote directory with tramp don't jump 'out' of the server. > So if we're connected with sudo to 'remotehost' > '$ lcd /etc' would go to '/sudo:remotehost:/etc' instead of just > '/etc' on localhost." > (setq directory (or directory "~/")) > (unless (file-remote-p directory) > (setq directory (concat (file-remote-p default-directory) directory))) > (eshell/cd directory)) Thank you Michael for your version. It's working nicely for me. :-) Dieter -- Best wishes H. Dieter Wilhelm Zwingenberg, Germany
