|
From: | John W. Eaton |
Subject: | Re: eliminating start-up message for non-interactive sessions |
Date: | Wed, 21 Jan 2015 12:40:59 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 |
On 01/21/2015 12:11 PM, Carnë Draug wrote:
On 21 January 2015 at 01:38, Rik <address@hidden> wrote:Your suggestion made a lot of sense so I implemented it in this cset (http://hg.savannah.gnu.org/hgweb/octave/rev/6ba5f1ff041e). It still prints the start-up message if you use input redirection to feed Octave a script, but I don't think many people do that. It certainly handles the shebang case and the --eval CODE case.Hi Rik I was thinking of taking a different approach at this which covers the case of having the code sent to STDIN. Instead of disabling the display of the message when there is --eval or script file, only display the message for interactive sessions and change he value of interactive when there is a script and code to eval. Here it is (inlined because it is so simple)
In the meantime, I checked in a separate patch in addition to Rik's that has the same effect:
http://hg.savannah.gnu.org/hgweb/octave/rev/f3ac54ac2c6aIn any case, I agree that we should also avoid the startup message unless we are interactive or forced interactive. And that reading input from a script file should probably not be considered an interactive session (unless that has some other consequence, like closing stdin and not allowing user interaction; I can't remember if that is the case). So if there is a cleaner solution than the combination of Rik's patch and mine, please go ahead and use it.
jwe
[Prev in Thread] | Current Thread | [Next in Thread] |