Support hiding columns in the CLI #1304
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds the
--hide-columns
CLI option, where a list of columns can be specified that should NOT be output when the plugin results are produced. If all columns are hidden it will throw an exception rather than running. It is a CLI option (so must be before the plugin) and cannot be the last (or only) CLI option, or the plugin name will be treated as a column name.This supercedes #1085, but it does NOT allow plugins to have any interaction about which columns to return (because it introduces too much scope for a task that is fundamentally a UI task).
Finally it also inverts the login in #1085 in that the parameter is
--hide-columns
rather than specify the explicit list of columns to display. I think this will be a more common use, although if one column starts with the same name as another column, it is impossible to hide just shorter column rather than both.@atcuno, could you please let me know if you're happy with the logic being this way around and that this resolves the issue you had #1302?
Closes #1081, #1085.