]> git.eshelyaron.com Git - emacs.git/commitdiff
Tramp 2.0.36 released.
authorKai Großjohann <kgrossjo@eu.uu.net>
Sun, 20 Jul 2003 19:00:56 +0000 (19:00 +0000)
committerKai Großjohann <kgrossjo@eu.uu.net>
Sun, 20 Jul 2003 19:00:56 +0000 (19:00 +0000)
(Remote shell setup): Explain about problems with
non-Bourne commands in ~/.profile and ~/.shrc.

man/ChangeLog
man/tramp.texi
man/trampver.texi

index 985d82e41ce58f1dbd17519ea76a5b7081a78393..4d2f9ca704dda93363a870bd1c4f6d2f19cf0f3b 100644 (file)
@@ -1,3 +1,9 @@
+2003-07-20  Kai Gro\e,A_\e(Bjohann  <kai.grossjohann@gmx.net>
+       Tramp version 2.0.36 released.
+
+       * tramp.texi (Remote shell setup): Explain about problems with
+       non-Bourne commands in ~/.profile and ~/.shrc.
+
 2003-07-13  Markus Rost  <rost@math.ohio-state.edu>
 
        * buffers.texi (List Buffers): Adjust to new format of *Buffer
index 49e10c9e58165d6114a588be908c2fc220eb1fff..07cffe261372072d7cf138fbdfc9d9b870f2a8f3 100644 (file)
@@ -1310,6 +1310,51 @@ The other approach is to teach @tramp{} about these questions.  See
 the variables @code{tramp-actions-before-shell} and
 @code{tramp-multi-actions} (for multi-hop connections).
 
+@item Non-Bourne commands in @file{.profile}
+
+After logging in to the remote host, @tramp{} issues the command
+@code{exec /bin/sh}.  (Actually, the command is slightly different.)
+When @code{/bin/sh} is executed, it reads some init files, such as
+@file{~/.shrc} or @file{~/.profile}.
+
+Now, some people have a login shell which is not @code{/bin/sh} but a
+Bourne-ish shell such as bash or ksh.  Some of these people might put
+their shell setup into the files @code{~/.shrc} or @code{~/.profile}.
+This way, it is possible for non-Bourne constructs to end up in those
+files.  Then, @code{exec /bin/sh} might cause the Bourne shell to barf
+on those constructs.
+
+As an example, imagine somebody putting @code{export FOO=bar} into the
+file @file{~/.profile}.  The standard Bourne shell does not understand
+this syntax and will emit a syntax error when it reaches this line.
+
+Another example is the tilde (@code{~}) character, say when adding
+@file{~/bin} to @code{$PATH}.  Many Bourne shells will not expand this
+character, and since there is usually no directory whose name consists
+of the single character tilde, strange things will happen.
+
+What can you do about this?
+
+Well, one possibility is to make sure that everything in @file{~/.shrc}
+and @file{~/.profile} on all remote hosts is Bourne-compatible.  In the
+above example, instead of @code{export FOO=bar}, you might use
+@code{FOO=bar; export FOO} instead.
+
+The other possibility is to put your non-Bourne shell setup into some
+other files.  For example, bash reads the file @file{~/.bash_profile}
+instead of @file{~/.profile}, if the former exists.  So bash
+aficionados just rename their @file{~/.profile} to
+@file{~/.bash_profile} on all remote hosts, and Bob's your uncle.
+
+The @tramp{} developers would like to circumvent this problem, so if you
+have an idea about it, please tell us.  However, we are afraid it is not
+that simple: before saying @code{exec /bin/sh}, @tramp{} does not know
+which kind of shell it might be talking to.  It could be a Bourne-ish
+shell like ksh or bash, or it could be a csh derivative like tcsh, or
+it could be zsh, or even rc.  If the shell is Bourne-ish already, then
+it might be prudent to omit the @code{exec /bin/sh} step.  But how to
+find out if the shell is Bourne-ish?
+
 @end table
 
 
index 8db1e07f1a04a6244a332088b90d5e9b902a47a1..f728531b9e9ac36a6fcfcf1ca0a13d73cbdd9fd4 100644 (file)
@@ -5,7 +5,7 @@
 @c configure.ac, so you should edit that file and run
 @c "autoconf && ./configure" to change the version number.
 @macro trampver{}
-2.0.35
+2.0.36
 @end macro
 
 @c Other flags from configuration