-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗺️ PR tour 🧭
* [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) |
There was a problem hiding this comment.
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
.
* [via `brew`](#via-brew) | ||
* [via `cargo`](#via-cargo) |
There was a problem hiding this comment.
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. 🤨
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. |
There was a problem hiding this comment.
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
.
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, | ||
| | | ], | ||
| | | } |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
item.raw_stream_item() | ||
.map(|i| self.confirm_encoding_is_supported(i.encoding())) | ||
.unwrap_or(Ok(()))?; |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.