Mostly with documentation/reality discrepancies, but here are some things I found while testing out drush 8.x-6x:

  1. core-requirements
    --fields: Available fields does not include 'summary'
  2. core-status
    --fields: No available fields listed, option shouldn't be given?
    --format: Only key-value and ini work, csv and list give error: "The output data could not be processed by the selected format 'string'. Array provided where a string is required."
    Issue #1959460? (http://drupal.org/node/1959460)
    Or possibly: http://drupal.org/node/1912628#comment-7181050
    Also seen in several other commands mentioned below.
  3. help
    --filter: When given with no value, (core) has no descriptive text, such as "All commands in drush core"
  4. php-eval
    --format: Should this even have a format option? (php-script doesn't)
  5. config-get
    --format: Values include: csv, csv-list, ini, ini-sections, key-value, key-value-list, list, string, table. Default is yaml. <- yaml? not even listed
    (Couldn't test, as I don't have a Drupal 8 install)
  6. field-info
    --format: ini gives The output data could not be processed by the selected format 'string'. Multiple rows provided where only one is allowed. [error]
  7. pm-info
    --format: table is completely borked, column widths not being calculated correctly?
  8. pm-list
    --format: key-value is given as an option, no output
  9. pm-updatestatus
    --format: ini lists modules but does not give any information, key-value does not output anything
  10. role-list
    --fields: perm is given as an option, doesn't affect anything?
    --format: key-value is given as an option, no output
  11. user-information
    --format: csv, ini, key-value, and list only output the userid, and nothing else
  12. cache-get
    --format: default values listed, but only valid options are print-r, export, and json
  13. site-alias
    --format: default values listed, but doesn't include default (config), or json or export
  14. variable-get
    --format: default values listed, but doesn't include default (labeled-export)
  15. watchdog-list
    --format: key-value is given as an option, no output
  16. watchdog-show
    --format: key-value is given as an option, no output

    Also, I noticed that print-r, json, export, and config are valid options, but are hardly ever mentioned. Should they be added to the default list of formats?

    I'll be happy to make a docs patch if these things can be cleared up solely with documentation, the other things require more knowledge than I have.

Comments

greg.1.anderson’s picture

Status: Active » Postponed

Many of the problems here will go away once we simplify the available output formats in #1959466: Reduce number of formats and/or do better guessing about what format user meant to use.. Let's wait until that issue lands, then re-analyze everything above, and tackle the remaining problems then.

Regarding print-r, json, export, and config, yes, these pretty much always work, but they are rarely mentioned in the help output because it would be too repetitious. Note that these are all listed when you run help in --verbose mode.

moshe weitzman’s picture

Issue summary: View changes

Numbered the items

moshe weitzman’s picture

Issue summary: View changes

Updated issue summary.

moshe weitzman’s picture

Issue summary: View changes

Updated issue summary.

moshe weitzman’s picture

Assigned: Unassigned » greg.1.anderson
Status: Postponed » Active

Thanks for compiling this list. I numbered the items in the Summary, so we can discuss them better. I crossed out a few that I think are OK. Please keep on nitpicking these docs - I really appreciate it. Some items have been fixed since this issue was filed.

1. core-requirements: Summary is the same as 'value'. I don't know why this is, but thats evident in the field-labels definition for this command. FYI, you can see exactly what the command callback returned by using --format=var_export.
2. core-status: We do show '--fields' now. Yes, key-value commands sufficiently unlike "table" commands and that they don't allow csv. The formats that are allowed are listed. I think this is OK.
3. help: When I pass --filter with no value, I get a prompt to pick a value which is pretty handy, IMO. help command does not yet support --format which is a bit sad. We'd have to change the output a bit to get it to do so.
4. php-eval: I agree this is a bit surprising, but I think it is OK. Drush will format your return value according to --format, if there is any.
5. config-get: yaml (and json, var_export) are now always shown. But it does happen that the default value is not in the available values list. The bug appears to be in drush_merge_engine_data() but I can't track it down. Help appreciated.
6. field-info: ini formatter is gone. other formats working fine.
7. pm-info: I think the layout is OK. It is a bunch of key-value groups, one after another. Are you expecting something different?
8. pm-list: I'm seeing this too. Seems like a bug. Any idea Greg? Should key-value format not be listed? This happens several times later in the list.
9. pm-updatestatus: ini is gone.
10. role-list: --filter working for me.
11: user-information: csv working as expected. list is supposed to only show one column. i think we are ok.
12: cache-get: yeah, we list too many formats here. Greg?
13+ The rest are OK - covered in items above

moshe weitzman’s picture

Status: Active » Closed (duplicate)
moshe weitzman’s picture

Issue summary: View changes

Updated issue summary.

greg.1.anderson’s picture

1. Fixed this in https://github.com/drush-ops/drush/issues/8

8. pm-list no longer lists key-value as an option; must have been fixed in a previous commit.

greg.1.anderson’s picture

Issue summary: View changes

Mark core-requirements / summary field task as done.

greg.1.anderson’s picture

Fixed 5 and 12 by reducing the number of formats shown in help for these commands. Also, if the default format normally wouldn't be shown in the help's list of available formats (e.g. because it is only shown in verbose mode), insure that it is shown anyway.

greg.1.anderson’s picture

Issue summary: View changes

pm-list key-value is working now; strike it off the list.

greg.1.anderson’s picture

Issue summary: View changes

Marked 5 and 12 done.