From: Kai Grossjohann <kai@emptydomain.de>
Subject: Re: Feature freeze and Tramp?
Date: Wed, 12 May 2004 09:32:48 +0200 [thread overview]
Message-ID: <8765b2ksm7.fsf@emptyhost.emptydomain.de> (raw)
In-Reply-To: 200405120102.i4C127e12749@raven.dms.auburn.edu
Luc Teirlinck <teirllm@dms.auburn.edu> writes:
> Kai Grossjohann wrote:
>
> Cool! Thanks for the fix, will incorporate this into Tramp shortly.
>
> That leaves us with the issue of those three remaining lines which are
> still somewhat of a nuisance. They can be completely gotten rid of by
> setting tramp-initial-commands to
>
> ("unset HISTFILE" "unset correct" "unset autocorrect")
>
> where the order is, of course, important. In other words "unset
> HISTFILE" is pushed onto the default value.
I have added this. It should be harmless at worst, and useful in many
cases.
> ("HISTFILE=" "export HISTFILE" "unset correct" "unset autocorrect")
>
> would, I believe, make the
>
> "HISTFILE=$HOME/.tramp_history; HISTSIZE=1; export HISTFILE; export HISTSIZE"
>
> unnecessary, but I am afraid that some shells might not recognize "export".
> However, was there any reason to use "HISTFILE=$HOME/.tramp_history;
> HISTSIZE=1;" instead of simply using "HISTFILE= ; export HISTFILE" at the
> same spot?
The initial commands are sent to the login shell, which might be a
csh, and a csh doesn't grok export. Therefore, putting export into
the initial commands doesn't seem to be right.
Bash isn't the only shell grokking HISTFILE and/or HISTSIZE; I think
the above construction was made to work with bash and ksh. I'd have
to dig it up in the Tramp mailing list archives to find out which
shells have been tested.
In general, it is difficult to keep track of which shell is active at
any one moment, and which commands might cause problems. For
instance, I used to have "unset foo >/dev/null; blah", only to find
out that some shells fail to execute blah if output from the builtin
is redirected...
Regarding HISTFILE/HISTSIZE, I could find the following ChangeLog
entry:
2001-01-10 Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
* tramp.el (tramp-open-connection-setup-interactive-shell): `unset
HISTFILE' rather than `set -o history' to turn off the history.
Pete Forman says this works on bash1 and bash2, but not for ksh or
a Posix sh. He also says there's no way to turn history off for
ksh and Posix shells, except by invoking non-interactively. I
won't do that, though, because I need the prompts.
HISTSIZE isn't mentioned at all, though. Hm. Ah, another entry:
2001-04-13 Kai Großjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
* tramp.el (tramp-open-connection-setup-interactive-shell): Posix
shells don't allow you to turn off the history, so we redirect it
to an innocuous file and limits that file's size as much as
possible.
(tramp-find-executable): Be extra careful when searching for
executables, include sentinel string to search for.
Does this help?
Kai
next prev parent reply other threads:[~2004-05-12 7:32 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-02 18:43 Feature freeze and Tramp? Kai Grossjohann
2004-05-02 19:19 ` David Kastrup
2004-05-03 6:20 ` Eli Zaretskii
2004-05-03 6:03 ` Kim F. Storm
2004-05-03 14:03 ` Richard Stallman
2004-05-07 21:23 ` Kai Grossjohann
2004-05-07 22:22 ` Miles Bader
2004-05-08 10:15 ` Kai Grossjohann
2004-05-10 1:33 ` Miles Bader
2004-05-10 1:39 ` Miles Bader
2004-05-08 2:34 ` Luc Teirlinck
2004-05-08 10:34 ` Kai Grossjohann
2004-05-09 1:40 ` Luc Teirlinck
2004-05-10 13:02 ` Kai Grossjohann
2004-05-11 2:49 ` Luc Teirlinck
2004-05-11 7:08 ` Kai Grossjohann
2004-05-12 0:53 ` Luc Teirlinck
2004-05-12 1:02 ` Luc Teirlinck
2004-05-12 7:32 ` Kai Grossjohann [this message]
2004-05-12 14:57 ` Luc Teirlinck
2004-05-13 6:54 ` Kai Grossjohann
2004-05-13 14:02 ` Luc Teirlinck
2004-05-15 16:36 ` Kai Grossjohann
2004-05-15 18:28 ` Luc Teirlinck
2004-05-16 9:07 ` Kai Grossjohann
2004-05-17 0:50 ` Luc Teirlinck
2004-05-17 5:11 ` Kai Grossjohann
2004-05-08 3:15 ` Luc Teirlinck
2004-05-09 2:11 ` Luc Teirlinck
2004-05-09 15:35 ` Robert J. Chassell
2004-05-09 16:26 ` Luc Teirlinck
2004-05-09 20:11 ` Stefan Monnier
2004-05-10 0:08 ` Luc Teirlinck
2004-05-09 2:34 ` Luc Teirlinck
2004-05-09 2:53 ` Luc Teirlinck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8765b2ksm7.fsf@emptyhost.emptydomain.de \
--to=kai@emptydomain.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).