bash history not restored
Earnie Boyd
earnie_boyd@yahoo.com
Mon May 24 09:08:00 GMT 1999
--- Ian Zimmerman <itz@lbin.com> wrote:
> So, HOW do I make history work AND have text opens/fopens by default?
> Is this a lose/lose situation? After all, text mount is still the
> default behavior, so this would make history not work out of the box.
> (I can't test that because my setup has gotten too far outside the box.
> :)
>
> Text mount is absolutely necessary for me; without it, I can't use Emacs
> (or any other Cygwin program) to handle non-Cygwin originated files.
This is a bug in the readline/history libraries used by bash. I haven't
tracked them down as yet. I hope to get some time this week to take a look at
it. The data is saved but with extra ^M's. It appears that there is a ^M on
each line for each time the history file is written to. So when `exit' is
written it is written as `exit^M'. The next time the history is saved the
previous `exit^M' becomes `exit^M^M'. The routines must error on the ^M if
binmode isn't set in the CYGWIN variable.
I've found that if I have binmode set and remove any existing ~/.bash_history
file that the ^M's aren't written to the file. Therefore, as a workaround
until the problem can be fixed, set the binmode switch in the CYGWIN
environment variable. This is supposed to be the default and I don't have a
clue as to why specifying the switch vs not specifying the switch makes a
difference but it does.
===
"Earnie Boyd" < mailto:earnie_boyd@yahoo.com >
CYGWIN RELATED HELP:
DOCUMENTATION: < http://sourceware.cygnus.com/cygwin/docs.html >
DLLHELP: < http://www.xraylith.wisc.edu/~khan/software/gnu-win32/ >
ARCHIVE SEARCH: < http://www.delorie.com/archives/ > OR
< http://www.eGroups.com/list/gnu-win32/ >
_____________________________________________________________
Do You Yahoo!?
Free instant messaging and more at http://messenger.yahoo.com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
More information about the Cygwin
mailing list