Mail Archives: cygwin/1999/05/24/13:02:45
Earnie Boyd wrote:
>
> --- 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.
But the documentation contains this Big Fat Warning:
In b20.1 only, a file will be opened in binary mode if any of the
following conditions hold:
1.binary mode is specified in the open call
2.CYGWIN contains binmode
3.the file resides in a binary mounted partition
So, it seems to me if I have binmode on, I lose text opens regardless of
mount type. Or is the warning misleading?
--
Ian Zimmerman
Lightbinders, Inc.
2325 3rd Street #324, San Francisco, California 94107
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -