mirror of
https://github.com/sharkdp/hexyl.git
synced 2026-10-26 20:16:31 +00:00
1 parent
2e2643782d
commit
7f8db4f113
2 files changed
+10
-1
No files matched your search
@@ -6,6 +6,7 @@
|
||||
- Add `--color-scheme` option, see #247 (@aticu)
|
||||
- Add `braille` character table, see #247 (@aticu)
|
||||
- Add command line argument to generate shell completion, see #155 (@friedz)
|
||||
- Add colors to `--help`/`-h`, see #253 (@starsep)
|
||||
|
||||
## Bugfixes
|
||||
|
||||
|
||||
+9
-1
@@ -3,7 +3,9 @@ use std::io::{self, prelude::*, BufWriter, SeekFrom};
|
||||
use std::num::{NonZeroI64, NonZeroU64};
|
||||
use std::path::PathBuf;
|
||||
|
||||
use clap::builder::styling::{AnsiColor, Effects};
|
||||
use clap::builder::ArgPredicate;
|
||||
use clap::builder::Styles;
|
||||
use clap::{ArgAction, CommandFactory, Parser, ValueEnum};
|
||||
use clap_complete::aot::{generate, Shell};
|
||||
|
||||
@@ -54,8 +56,14 @@ Since the terminal width may not be an evenly divisible by the width per hex dat
|
||||
the right.
|
||||
Cannot be used with other width-setting options.";
|
||||
|
||||
const STYLES: Styles = Styles::styled()
|
||||
.header(AnsiColor::Green.on_default().effects(Effects::BOLD))
|
||||
.usage(AnsiColor::Green.on_default().effects(Effects::BOLD))
|
||||
.literal(AnsiColor::Cyan.on_default().effects(Effects::BOLD))
|
||||
.placeholder(AnsiColor::Cyan.on_default());
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(version, about, max_term_width(90))]
|
||||
#[command(version, about, max_term_width(90), styles = STYLES)]
|
||||
struct Opt {
|
||||
/// The file to display. If no FILE argument is given, read from STDIN.
|
||||
#[arg(value_name("FILE"))]
|
||||
|
||||
Reference in new issue
Block a user