Skip to content

Export empty CSV columns for reference command parameters - #902

Open
lixitrixi wants to merge 1 commit into
sharkdp:masterfrom
lixitrixi:fix-params-csv-export
Open

Export empty CSV columns for reference command parameters#902
lixitrixi wants to merge 1 commit into
sharkdp:masterfrom
lixitrixi:fix-params-csv-export

Conversation

@lixitrixi

Copy link
Copy Markdown

Fixes #852

The problem was that the first command result was used to create the parameter CSV headers, even though this could be the reference command (which has no params). Here I find the first result with non-empty params and use it instead.

For the reference command, I export an empty value for each parameter to match the number of columns. IMO this is correct since the reference command has no parameter values. #877 uses lookup to print each column; I avoid this since iterating is cheaper and a reference command is very rare compared to parametrized commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CSV error when using parameters with --reference

1 participant