Commit graph

54 commits

Author SHA1 Message Date
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
sharkdp c75a882081 Update dependencies 2019-10-08 20:32:56 +02:00
sharkdp 81787d0858 Bump version 2019-10-08 20:31:56 +02:00
sharkdp 9c46ced572 Enable LTO 2019-10-08 20:09:10 +02:00
sharkdp 82c34fe39b Bump version 2019-05-30 15:35:21 +02:00
sharkdp 2ad15413b9 Bump version 2019-04-13 18:39:34 +02:00
sharkdp 3390bedee9 Update to Rust 2018 2019-04-13 18:27:21 +02:00
sharkdp 7e46a5d788 Bump version 2019-01-14 10:51:32 +01:00
sharkdp 19030470f9 Add proper Ctrl-C handling 2019-01-14 10:40:04 +01:00
sharkdp f6f41e76aa Use --color=always/auto/never instead of --no-color 2019-01-14 09:14:47 +01:00
sharkdp 0dad8bf481 Bump version 2019-01-10 08:36:45 +01:00