On Sat, 17 Mar 2001, Tom Roche wrote:
>> How do I "[set ksh envvars] from within Tramp"? <snip> Must I hack
>> tramp.el?

[EMAIL PROTECTED] 18 Mar 2001 18:12:37 +0100
> Well, of course you can hack tramp.el.  But you can also try it out
> outside of Tramp, by logging in to the remote host, starting ksh (the
> same that Tramp uses), send the command you want to send (to turn off
> history), then send some more commands, then exit the ksh, then see if
> the history has been saved or not.

Well, that does make sense :-)

> Fwiw, ksh syntax is "HISTSIZE=0" and "HISTFILE=/dev/null", I think,
> without `set'.

I tried both with the ksh on ssh.ncsu.edu. (Unfortunately I don't know
what version that is. I tried typing 'version' at the ksh prompt: it
told me about hardware, SunOS, and "Sun WorkShop University Edition
5.0" (whatever that is), but nothing about ksh.) 

HISTSIZE=0

seemed to make no difference: .sh_history kept getting bigger.
Neither did

HISTFILE=/dev/null

What _almost_ works, oddly enough, is just deleting the file:

> $ whatever
> ksh: whatever:  not found
> $ and ever
> ksh: and:  not found
> $ cat .sh_history
> whatever
> and ever
> cat .sh_history
> $ rm .sh_history
> $ whatever
> ksh: whatever:  not found
> $ and ever
> ksh: and:  not found
> $ cat .sh_history
> cat: .sh_history: No such file or directory
> $ ls -alt
> total 1900
> -rw-------   1 tlroche  ncsu          114 Mar 18 19:39 .__afs7864
> drwxrwxrwx  44 tlroche  root         6144 Mar 18 19:39 .
> -rw-------   1 tlroche  ncsu           21 Mar 18 19:16 .ceminc-stat
> -rw-------   1 tlroche  ncsu            0 Mar 18 19:16 .cemchk-run
<snip>

Unfortunately

> $ cat .__afs7864
> whatever
> and ever
> cat .sh_history
> rm .sh_history
> whatever
> and ever
> cat .sh_history
> ls -alt
> cat .__afs7864

Truly annoying. What part of "no history" doesn't it understand ?-)
Or, now that I think of it ... could this actually be something
AFS is doing (given that 'afs' is part of the filename)? But why?

> Maybe you could also look at the `set' ksh builtin.  Sometimes that
> offers you a way to turn on/off such features, too.  Hypothetical
> example: `set -h' turns history off, `set +h' turns it on.

'set -h' apparently did nothing: 

> /ncsu/tlroche> ksh
> $ set -h
> $ whatever
> ksh: whatever:  not found
> $ and ever
> ksh: and:  not found
> $ ls -alt
> total 1295
> -rw-------   1 tlroche  ncsu           40 Mar 18 19:46 .sh_history
<snip>
> $ cat .sh_history
> set -h
> whatever
> and ever
> ls -alt
> cat .sh_history

FWIW, [EMAIL PROTECTED]

Reply via email to