This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: close cygwin window - bash doesnt save history


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@helixdigital.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]