delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/05/24/12:09:34

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <19990524161136.16095.rocketmail@web125.yahoomail.com>
Date: Mon, 24 May 1999 09:11:36 -0700 (PDT)
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Reply-To: earnie_boyd AT yahoo DOT com
Subject: Re: bash history not restored
To: Ian Zimmerman <itz AT lbin DOT com>, cygwin AT sourceware DOT cygnus DOT com
MIME-Version: 1.0

--- Ian Zimmerman <itz AT lbin DOT 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 AT yahoo DOT 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 AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019