delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/13/08:45:28

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Sat, 13 Jul 2002 05:43:54 -0700
From: Dario Alcocer <alcocer AT helixdigital DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: close cygwin window - bash doesnt save history
Message-ID: <20020713054354.A6037@ns.helixdigital.com>
References: <20020713014539 DOT 17777 DOT qmail AT email DOT com>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5.1i
In-Reply-To: <20020713014539.17777.qmail@email.com>; from shane_brooks@email.com on Fri, Jul 12, 2002 at 08:45:39PM -0500

On Fri, Jul 12, 2002 at 08:45:39PM -0500, Shane Brooks wrote:
> I couln't agree with you more.  I have read the bash man pages several times over though I dont understand it all...
[snip]
> 
> Believe me - we aren't all newbies looking for a quick lazy fix - but at some stage we *are* all newbies.
> 
> I dont have the TTY env var set...but thats another thread. 
> 
> Still tryin'

Have you tried logout in the SIGHUP handler?  I just tried the following
on my installation, and the history is saved when I click the close
button:

    $ myclosefn() {
      logout
    }
    $ trap myclosefn SIGHUP

I tested this by double-clicking the "Cygwin" icon, entering the
commands above, and clicking the close button.  Once I double-click
the Cygwin icon again, doing a 'history | tail' will show the
commands above.
 
-- 
Dario Alcocer -- Sr. Software Developer, Helix Digital Inc.
alcocer AT helixdigital DOT com -- http://www.helixdigital.com

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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