From: Michael Albinus Date: Sun, 29 Nov 2009 20:40:51 +0000 (+0000) Subject: * tramp.texi (Remote processes): Improve eshell example with "su" X-Git-Tag: emacs-pretest-23.1.90~174 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=07b6428ccd287539c88f90860026fe91ae012f8b;p=emacs.git * tramp.texi (Remote processes): Improve eshell example with "su" and "sudo" commands. --- diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 7b0a82f5ce7..8fd689af944 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog @@ -1,3 +1,8 @@ +2009-11-29 Michael Albinus + + * tramp.texi (Remote processes): Improve eshell example with "su" + and "sudo" commands. + 2009-11-28 Chong Yidong * semantic.texi (Analyzer Internals): Rename from Analyzer. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 2c48fe32c55..f0c0b6a3924 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -2584,6 +2584,27 @@ uid=0(root) gid=0(root) groups=0(root) @b{@trampfn{sudo, root, host, /etc} $} @end example +@ifset emacs +Since @value{emacsname} 23.2, @code{eshell} has also an own +implementation of the @code{su} and @code{sudo} commands. Both +commands change the default directory of the @file{*eshell*} buffer to +the value related to the user the command has switched to. This works +even on remote hosts, adding silently a corresponding entry to the +variable @code{tramp-default-proxies-alist} (@pxref{Multi-hops}): + +@example +@b{~ $} cd @trampfn{ssh, user, remotehost, /etc} @key{RET} +@b{@trampfn{ssh, user, remotehost, /etc} $} find-file shadow +File is not readable: @trampfn{ssh, user, remotehost, /etc/shadow} +@b{@trampfn{ssh, user, remotehost, /etc} $} sudo find-file shadow +# +@b{@trampfn{ssh, user, remotehost, /etc} $} su - @key{RET} +@b{@trampfn{su, root, remotehost, /root} $} id @key{RET} +uid=0(root) gid=0(root) groups=0(root) +@b{@trampfn{su, root, remotehost, /root} $} +@end example +@end ifset + @anchor{Running a debugger on a remote host} @subsection Running a debugger on a remote host