mirror of
https://github.com/sharkdp/hexyl.git
synced 2026-10-30 09:05:54 +00:00
1 parent
711627bfe8
commit
45fa72ec3b
3 files changed
+79
-12
No files matched your search
+16
-12
@@ -144,6 +144,21 @@ fn run() -> Result<()> {
|
||||
.action(ArgAction::SetTrue)
|
||||
.help("Show the character panel on the right. This is the default, unless --no-characters has been specified."),
|
||||
)
|
||||
.arg(
|
||||
Arg::new("character-table")
|
||||
.long("character-table")
|
||||
.value_name("FORMAT")
|
||||
.value_parser(["default", "ascii", "codepage-437"])
|
||||
.default_value("default")
|
||||
.help(
|
||||
"Defines how bytes are mapped to characters:\n \
|
||||
\"default\": show printable ASCII characters as-is, '⋄' for NULL bytes, \
|
||||
' ' for space, '_' for other ASCII whitespace, \
|
||||
'•' for other ASCII characters, and '×' for non-ASCII bytes.\n \
|
||||
\"ascii\": show printable ASCII as-is, ' ' for space, '.' for everything else.\n \
|
||||
\"codepage-437\": uses code page 437 (for non-ASCII bytes).\n"
|
||||
),
|
||||
)
|
||||
.arg(
|
||||
Arg::new("no_position")
|
||||
.short('P')
|
||||
@@ -213,18 +228,6 @@ fn run() -> Result<()> {
|
||||
.hide(true)
|
||||
.help("An alias for '--endianness=little'."),
|
||||
)
|
||||
.arg(
|
||||
Arg::new("character-table")
|
||||
.long("character-table")
|
||||
.value_name("FORMAT")
|
||||
.value_parser(["default", "codepage-437"])
|
||||
.default_value("default")
|
||||
.help(
|
||||
"The character table that should be used. 'default' \
|
||||
will show dots for non-ASCII characters, 'codepage-437' \
|
||||
will use code page 437 for those characters."
|
||||
),
|
||||
)
|
||||
.arg(
|
||||
Arg::new("base")
|
||||
.short('b')
|
||||
@@ -497,6 +500,7 @@ fn run() -> Result<()> {
|
||||
.as_ref()
|
||||
{
|
||||
"default" => CharacterTable::Default,
|
||||
"ascii" => CharacterTable::Ascii,
|
||||
"codepage-437" => CharacterTable::CP437,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user