Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates README, hides --no-auto-decompress for cmds without i/o #120

Merged
merged 2 commits into from
Jun 7, 2024

Conversation

zslayton
Copy link
Contributor

@zslayton zslayton commented Jun 7, 2024


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor Author

@zslayton zslayton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗺️ PR tour 🧭

Comment on lines +9 to +12
* [Viewing the contents of an Ion file](#viewing-the-contents-of-an-ion-file)
* [Converting between Ion formats](#converting-between-ion-formats)
* [Converting between Ion and other formats with `to` and `from`](#converting-between-ion-and-other-formats-with-to-and-from)
* [Analyzing binary Ion file encodings with `inspect`](#analyzing-binary-ion-file-encodings-with-inspect)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗺️ I added a "Viewing the contents of an Ion file" section to demonstrate ion cat and removed a reference to dump.

Comment on lines +14 to +15
* [via `brew`](#via-brew)
* [via `cargo`](#via-cargo)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗺️ My IDE modified the spacing for the bullet lists. Hard to be mad about it though; GitHub markdown's default list indentation is three spaces. 🤨

Comment on lines +30 to +31
The `ion cat` command reads the contents of the specified files (or `STDIN`) sequentially
and writes their content to `STDOUT` in the requested Ion format.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗺️ This sentence was mostly borrowed from man cat.

Comment on lines -70 to -98
ion beta inspect my_file.10n

---------------------------------------------------------------------------
Offset | Length | Binary Ion | Text Ion
---------------------------------------------------------------------------
| 4 | e0 01 00 ea | // Ion 1.0 Version Marker
4 | 4 | ee 95 81 83 | '$ion_symbol_table':: // $3::
8 | 19 | de 91 | {
10 | 1 | 86 | 'imports': // $6:
11 | 2 | 71 03 | $ion_symbol_table, // $3
13 | 1 | 87 | 'symbols': // $7:
14 | 13 | bc | [
15 | 4 | 83 66 6f 6f | "foo",
19 | 4 | 83 62 61 72 | "bar",
23 | 4 | 83 62 61 7a | "baz",
| | | ],
| | | }
27 | 13 | dc | {
28 | 1 | 8a | 'foo': // $10:
29 | 1 | 0f | null,
30 | 1 | 8b | 'bar': // $11:
31 | 1 | 11 | true,
32 | 1 | 8c | 'baz': // $12:
33 | 7 | b6 | [
34 | 2 | 21 01 | 1,
36 | 2 | 21 02 | 2,
38 | 2 | 21 03 | 3,
| | | ],
| | | }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗺️ Now that inspect uses a variety of colors/styles, copy/pasted terminal output doesn't do it justice. I replaced each output example with a screenshot.

beta The 'beta' command is a namespace for commands whose interfaces are
not yet stable.
dump Prints Ion in the requested format
help Prints this message or the help of the given subcommand(s)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section has been updated to the current --help output.

Comment on lines +215 to +217
item.raw_stream_item()
.map(|i| self.confirm_encoding_is_supported(i.encoding()))
.unwrap_or(Ok(()))?;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗺️ I revised this section to fix a layout bug that would cause the table header to be output multiple times if you were using --skip-bytes.

@@ -155,12 +155,18 @@ impl WithIonCliArgument for ClapCommand {
)
}

fn with_compression_control(self) -> Self {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗺️ Prior to this change, ion help would include the --no-auto-decompress flag in its output. This was potentially confusing, as ion help (and ion itself) take no input.

@zslayton zslayton merged commit 3f0bfd6 into master Jun 7, 2024
7 checks passed
@zslayton zslayton deleted the update-readme branch June 7, 2024 15:27
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.

2 participants