Improving net help output

Matthieu Patou mat+Informatique.Samba at matws.net
Fri Jan 8 11:24:56 MST 2010


Hello all,

I was looking at s4's net help output and feel that it lack the 
information about the available flags.

I think it would be desirable to have the output of net --help (for the 
different switches) when the user do net help.

The problem is that popt autohelp (triggered by --help/-?/--usage switch 
or by calling poptPrintHelp) generate it's own Usage: [option] line 
which makes ugly to call in net_help as it duplicate the Usage line.

Using poptSetOtherOptionHelp could be a solution but it would require 
that net_help_python and net_help_builtin to be able to output in a 
char* buffer instead of using stdout might be overkill for the need.
Another options is to trick with control chars so that 
poptSetOtherOptionHelp just clean the first chars (Usage), like a CR.

When I compare to s3 it's done by outputing a separately defined 
function for most commong (all ?) flags.
It leave the option to redo what popPrintHelp is already doing.

Can I have someone else point of view ?

Matthieu.


More information about the samba-technical mailing list