Sort -B options under the hood to ensure proper order for parsing #5441
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.
Description of proposed changes
The parsing of -B works with fewest complications if the intervals are parsed first, then axes settings, then the frame settings. However, the user should not have to worry about this. This PR checks the -B options and if there are more than one and the order is not the preferred one we sort the options to place -B in the correct order at the end.
With this PR issues such as #5344 works. I am also fixing a few scripts to use the proper syntax. Closing #5344.
This is also potentially useful for GMT.jl where the order of the -B options generated would no longer need to be handled on the Julia side, @joa-quim.