#012567: Implement grouping of ezcConsoleOptions on output

Description:

Would be nice to have the possibility to group ezcConsoleOption for more logical and readable --help output.

Example (from wget- h):


Startup:
  -V,  --version           display the version of Wget and exit.
  -h,  --help              print this help.
  -b,  --background        go to background after startup.
  -e,  --execute=COMMAND   execute a `.wgetrc'-style command.

Logging and input file:
  -o,  --output-file=FILE    log messages to FILE.
  -a,  --append-output=FILE  append messages to FILE.
  -d,  --debug               print lots of debugging information.
  -q,  --quiet               quiet (no output).
  -v,  --verbose             be verbose (this is the default).
  -nv, --no-verbose          turn off verboseness, without being quiet.
  -i,  --input-file=FILE     download URLs found in FILE.
  -F,  --force-html          treat input file as HTML.
  -B,  --base=URL            prepends URL to relative links in -F -i file.


Environment:

Operating System:
PHP Version: (please be specific, like '4.4.3' or '5.1.5')
Database and version:
Browser (and version):


- Attachments

No attachments for this issue.


- Comments

Implemented in rev. #8425.

#257113 by Tobias Schlitt on June 18th, 2008 [Permanent Link]

Hi

With the new implementation, is is possible to have an option in several groups ?
like for instance:


General options:
  -V,  --version           display the version of Wget and exit.
  -h,  --help              print this help.
  -a,  --action=ACTION     Action to perform (CREATE, REMOVE)

CREATE action:
  -u,   --username=        The username to create
  -e,   --email=           Email address of the user to add

REMOVE action:
  -u,   --username=        The username to delete

Note that in the example above description for the ''username" is also different in the two groups

#257115 by Vidar Langseid on June 18th, 2008 [Permanent Link]

Hi!

No, this is not possible, since options are global to the input processor. It is generally not possible to have certain options multiple times with different meanings under different conditions.

What you can do is define dependencies between options. However, that does not really lead to the desired result. Still you need to use unique names for your options.

If this is an important feature for you, we need to create a design for it and plan it properly for the next release, since it needs quite some effort to realize grouping of options on a lower level of the component. So far it only affects the help text generation itself.

Regards,
Toby

#257116 by Tobias Schlitt on June 18th, 2008 [Permanent Link]

Well, for me it is kinda project. I have a script where some options are dependent on others (like in my example). Everything works ( I just have to do further checking what options are given and return error if the options.

The big drawback is that the help text is really messy and it is not possible to display the relations between options correctly

#257117 by Vidar Langseid on June 18th, 2008 [Permanent Link]

- History
Properties
Type Enhancement
Priority Medium
Component Components » ConsoleTools
Affects Unknown
Fix Version 2008.2alpha1 - eZ components 2008.2alpha1
Reporter Ole Morten Halvorsen
Responsible Tobias Schlitt
Status 0 Closed
Resolution Implemented
Created February 19th, 2008
Updated June 18th, 2008
Resolved June 18th, 2008
 
Navigation [Permanent Link]
Previous Issue
Back to Issues List
Next Issue: #015537
  Graph shows to small and truncated rotated axis labels