help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to remove the redundant print when use help()?


From: Peng Yu
Subject: Re: How to remove the redundant print when use help()?
Date: Fri, 24 Aug 2012 10:07:07 -0500

On Fri, Aug 24, 2012 at 9:27 AM, Mike Miller <address@hidden> wrote:
> On Fri, Aug 24, 2012 at 10:18 AM, Peng Yu wrote:
>>>> Whenever I call help(), I got the following output. It is annoying. Is
>>>> there a way to disable it? Thanks!
>>>
>>> help suppress_verbose_help_message
>>
>> There are also some empty line after the help (noted by ##). Is there
>> a way to remove them as well? Thanks!
>
> The text displayed is also the return value of help called as a
> function, so you can do:
>
> suppress_verbose_help_message (true);
> func = "pwd";
> strtrim( help (func))
>
> Does that work for you?

Unfortunately, this does not work. See screen output below.

/tmp$ cat test.sh
#!/usr/bin/env bash

/opt/local/bin/octave -q << EOF
strtrim(help('help'))
EOF

/tmp$ ./test.sh
`help' is a function from the file /opt/local/share/octave/3.2.4/m/help/help.m

 -- Command: help NAME
     Display the help text for NAME.  If invoked without any arguments,
     `help' prints a list of all the available operators and functions.

     For example, the command `help help' prints a short message
     describing the `help' command.

     The help command can give you information about operators, but not
     the comma and semicolons that are used as command separators.  To
     get help for those, you must type `help comma' or `help semicolon'.

     See also: doc, lookfor, which



error: Invalid call to strtrim.  Correct usage is:

 -- Function File:  strtrim (S)


/tmp$ octave
GNU Octave, version 3.2.4
Copyright (C) 2009 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Octave was configured for "i386-apple-darwin10.8.0".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html

Report bugs to <address@hidden> (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful report).

For information about changes from previous versions, type `news'.

octave:1> x=help('help')
`help' is a function from the file /opt/local/share/octave/3.2.4/m/help/help.m

 -- Command: help NAME
     Display the help text for NAME.  If invoked without any arguments,
     `help' prints a list of all the available operators and functions.

     For example, the command `help help' prints a short message
     describing the `help' command.

     The help command can give you information about operators, but not
     the comma and semicolons that are used as command separators.  To
     get help for those, you must type `help comma' or `help semicolon'.

     See also: doc, lookfor, which



error: value on right hand side of assignment is undefined




-- 
Regards,
Peng


reply via email to

[Prev in Thread] Current Thread [Next in Thread]