[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CLI hook on leave
From: |
Tom Olin |
Subject: |
Re: CLI hook on leave |
Date: |
Wed, 6 Nov 2013 13:49:23 -0500 |
The second argument (optional) to atexit should be a boolean indicating whether
to register or unregister the function from the function list.
Try this instead:
function curtains()
close(all);
end
atexit('curtains');
--
Tom Olin
Senior Systems Engineer | PAR Government Systems Corporation
315.356.2142 | address@hidden | http://pargovernment.com
On Nov 6, 2013, at 1:37 PM, Ben Abbott <address@hidden> wrote:
> On Nov 6, 2013, at 12:37 PM, Arve Gengelbach wrote:
>
>> Hi all,
>>
>> On the command line:
>> I would want to run ‘close all’ every time I leave octave’s interactive mode
>> (pressing Ctrl+D or with exit).
>> Is there some possibility to run code before exiting the interactive CLI?
>>
>> cheers
>> Arve
>
> I haven't tried it myself, but if you place the line below in your
> ~/.octaverc, then Octave should "close all" as it exists.
>
> atexit ("close", "all")
>
> Ben
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave
smime.p7s
Description: S/MIME cryptographic signature