64 Commits
Author SHA1 Message Date
David Peter 8eb6d4771c Bump version to v0.17.0 2026-02-14 13:53:54 +01:00
David Peter 626f03bfbd Fix #254 2026-02-14 13:49:10 +01:00
n4n5 96e427cb4a Improve crate && fix CI (#256)
* feat: improve crate

* fix: CI
2026-02-14 13:09:13 +01:00
Friedrich 'friedɀ' SchwedlerandDavid Peter 585d06293a Add shell completion (#251)
* add commandline argument to generate shell completion

* update changelog

* fixup! add commandline argument to generate shell completion

* Update option name and description

---------

Co-authored-by: David Peter <mail@david-peter.de>
2025-08-31 21:39:17 +02:00
David Peter 38301f3759 Fix clippy, CI 2025-08-31 21:17:54 +02:00
Dan Hipschman 9ef7c346dd Enable custom colors with environment variables (#248)
* Enable custom colors with environment variables

* Rename HEXYL_XYZ env vars to HEXYL_COLOR_XYZ
2025-06-16 22:41:37 +02:00
David Peter abc20a380c Bump version 2024-12-27 14:43:18 +01:00
David Peter dbed12e423 Update MSRV 2024-10-29 22:44:53 +01:00
David Peter 1927610953 Update MSRV 2024-10-29 22:42:12 +01:00
David Peter f8531b3e44 Updates for v0.15.0 2024-10-29 22:17:12 +01:00
Shun Sakai 252a6dbef4 Rewrite CLI using derive API 2024-07-01 22:39:28 +09:00
David Peter ba89e88dfd Update dependencies 2023-12-11 22:58:42 +01:00
Pavel Grigorenko 59557bd433 Bump predicates to not depend on both 2.x & 3.x 2023-08-21 15:42:02 +03:00
David Peter 5981fc8725 Bump MSRV to 1.66 2023-07-26 08:54:15 +02:00
David Peter f4515b0f14 Update CHANGELOG 2023-07-26 08:51:26 +02:00
David Peter e3d406dd95 Update dependencies 2023-07-26 08:47:03 +02:00
David Peter e10136d203 Updates for 0.13 2023-05-10 22:19:07 +02:00
David Peter bfa2726e05 CI update 2023-04-21 21:02:49 +02:00
David Peter ee56a3396d Bump version 2022-12-07 23:48:29 +01:00
Sharif Haason 4fc0c1f1b0 Replace anstyle with owo-colors 2022-12-06 11:27:16 -05:00
Sharif Haason 5bd76fd11b Replace is-terminal with supports-color and make auto default for color 2022-12-06 11:24:53 -05:00
David Peter 421bd73ec1 Revert "Replace libc with rustix"
This reverts commit 571312dd6e.
2022-12-05 09:52:27 +01:00
David Peter c6af2edda8 Bump version 2022-12-05 09:32:07 +01:00
Sharif Haason 571312dd6e Replace libc with rustix 2022-12-04 21:48:10 -05:00
Sharif Haason fcd09fffac Relax anstyle version 2022-12-04 21:43:03 -05:00
Sharif Haason 188e753675 Replace atty with is-terminal 2022-12-04 21:42:44 -05:00
Sharif Haason 252b4e84c3 Merge branch 'master' into anstyle 2022-11-27 10:03:53 -05:00
Mikhail Katychev b1ff8b6ce4 added squeeze tests 2022-11-26 20:18:21 +01:00
Sharif Haason ad9ecda952 Remove once_cell dependency 2022-11-19 11:04:59 -05:00
Sharif Haason df1afdc73f Merge branch 'anstyle' of https://github.com/sharifhsn/hexyl into anstyle 2022-11-18 16:15:12 -05:00
Sharif Haason 165ced9307 Update to clap 4.0 2022-11-18 19:22:24 +01:00
Sharif Haason 794e1935e3 Prerender color strings for better performance 2022-11-18 10:39:54 -05:00
Sharif Haason a49f295acc Replace deprecated ansi_term with anstyle 2022-11-17 22:12:00 -05:00
Sharif Haason 1fdd770093 Implement -a and -t for terminal width setting 2022-09-11 21:45:06 +02:00
David Peter f5814d4442 Update version 2022-05-22 22:23:25 +02:00
David Peter 49ebf4771f Update to clap 3 2022-05-22 22:21:49 +02:00
David Peter 4904a7e26f Relax constraints 2022-05-22 21:53:26 +02:00
David Peter becc1b80f1 Update dependencies 2022-05-22 21:52:44 +02:00
merkrafter 37d4180f9a Refactor default block size into constant 2021-11-14 09:26:21 +01:00
David Peter 4594d29f73 Bump version to 0.9.0 2021-07-11 20:09:28 +02:00
David Peter cc73f01c34 Update dependencies 2021-07-11 20:09:28 +02:00
sharkdp 8c3f2230c6 Better error message when seek fails
> hexyl "$(which hexyl)" --skip=-5gib
    Error: Failed to jump to the desired input position. This could be
    caused by a negative offset that is too large or by an input that is not
    seek-able (e.g. if the input comes from a pipe).

ref: #114
2020-11-01 22:56:59 +01:00
sharkdp 09c22e09b9 Add simple integration tests 2020-10-30 10:07:24 +01:00
Erich Gubler 13aec946a3 improvement: make diagnostics for flags involving byte count parsing actually good
This adds an error type called `ByteCountParseError` with a vanilla
`std::error::Error` implementation. The code could be significantly
compressed with a dependency like `thiserror`.

I opted to implement a separate error type for `parse_byte_count` rather
than using `anyhow`'s small ecosystem of error types there (though they
are used in `<binary>::run`) because it allows pairing diagnostic
results with tests, incl. those already written. This can be helpful in
preventing regressions in error diagnostics.
2020-06-17 18:05:42 +02:00
Erich Gubler 2bdf5d768f feat: use anyhow for more structured error messages and better error reporting flexibility
This significantly changes the structure of potential output of
top-level errors.  Before, errors that have a `source` were printed on a
single line, with the `source` omitted. Now, an error with a `source`
will be printed like:

```
Error: <`Display` impl of error>

Caused by:
    <`Display` impl of `source` error>
```

If there are multiple `source` errors in a chain, then it will be of the
form:

```
Error: <`Display` impl of error>

Caused by:
    0: <`Display` impl of first `source` error>
    1: <`Display` impl of `source` of `source` error>
    # etc.
```

Now, in practice this never happened before, since the only error
type that ever could return from `<binary>::run` was `std::io::Error`,
which has no `source`. However, `source`s can start being added if, say,
future work involved using `anyhow::Context::context` or custom errors
that implement `std::Error::source` are added to the codebase. I believe
this is a good choice going forward, but I definitely want to foster
discussion and acceptance for it in the open first!
2020-06-17 18:05:42 +02:00
sharkdp a7892881f3 Wrap help text at 90 characters 2020-06-08 23:19:56 +02:00
sharkdp 478cc25ffd Bump version to 0.8.0 2020-06-07 15:12:35 +02:00
Mario Reder 5327b71215 fix review comments 2020-05-13 18:55:24 +02:00
sharkdp 2bda250906 Bump version 2020-03-09 20:41:00 +01:00
sharkdp f71ad1e00d Remove Ctrl-C handler, fixes #84 2020-03-09 20:20:12 +01:00