Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
Sender: cygwin-owner@sourceware.cygnus.com
Delivered-To: mailing list cygwin@sourceware.cygnus.com
Message-ID: <374AF3EA.D64AACFF@lbin.com>
Date: Tue, 25 May 1999 12:03:06 -0700
From: Ian Zimmerman <itz@lbin.com>
Organization: Lightbinders, Inc.
X-Mailer: Mozilla 4.51 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Cygnus tools mailing list <cygwin@sourceware.cygnus.com>
Subject: bash history file: worked around [Was: bash history not restored]
References: <3744692B.6908E74@lbin.com> <374530BB.7C6AA9E8@frank.de>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Victor Ott wrote:
> 
> Ian Zimmerman wrote:
> > No matter what I do, I can't seem to make bash restore the command
> > history from .bash_history when it starts.  During a session,
> > interactive history mode works; moreover, current history is saved to
> > the file when session ends.  But the next session will again start with
> > empty history :-[
> >
> > Running Cygwin-b20.1, NT Workstation SP4, FAT fs, text mount.
> 
> I think it's the text mount. As far I've seen, bash imports history
> entries from past bash sessions only when 'binmode' is set in CYGWIN
> env. var., and that's what I am doing. Others might have other
> solutions.
> 

This is what I ended up doing in cygnus.bat:

bash -c '/home/itz/bin/dos2unix.sh .bash_history'

where dos2unix.sh  is

#! /bin/sh

tempfile=/mnt/dos2unix.$$
tr -d '\r\032' <$1 >$tempfile
mv $tempfile $1


Note that I had to use /mnt, not /tmp because /mnt is my only binary
mount point.
It still sucks, but it "works".

-- 
Ian Zimmerman
Lightbinders, Inc.
2325 3rd Street #324, San Francisco, California 94107

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

