Commit graph

406 commits

Author SHA1 Message Date
Danilo Bargen
cab6666ffb Fix completions: Remove -p for pager 2022-01-21 09:14:30 +01:00
cyqsimon
d5dbe3084b
Add no-auto-update flag (#257)
* Added `no-auto-update`
* Updated usage.txt
* Add `no-auto-update` to completion scripts
* Apply review suggestions
2022-01-21 09:12:10 +01:00
Danny Moesch
2177297871
Move shell completion scripts to their own directory (#259)
* Move shell completion scripts to their own directory
* Remove completion scripts from published Cargo package
2022-01-20 09:10:18 +01:00
Danny Moesch
3b4451f8fa
Move definition of CLI arguments and options into own file (#258) 2022-01-19 23:49:23 +01:00
cyqsimon
ef7432c762 Enforce default rustfmt settings (#257) 2022-01-16 20:16:58 +01:00
Danilo Bargen
b5443b75b6
Merge pull request #253 from dbrgn/handle-download-errors
Handle cache download errors. Fixes #252.
2022-01-09 21:24:22 +01:00
Danilo Bargen
77a6d48381 Pages download: Check return status 2022-01-09 21:14:30 +01:00
Danilo Bargen
71b6e037a7 When decompressing ZIP fails, propagate error
Do not unwrap. Instead, propagate the error with a anyhow context.
2022-01-09 21:14:30 +01:00
Danilo Bargen
04804ae650
Merge pull request #231 from tranzystorek-io/fix-pager
Move pager configuration near render logic. Fixes #169.
2022-01-09 15:13:57 +01:00
Marcin Puc
4a9763a783 Ensure that pager configuration is run at most once 2022-01-09 13:08:10 +01:00
Marcin Puc
82e4b97f92 Move pager configuration near render logic 2022-01-09 01:27:42 +01:00
Danilo Bargen
d502fcdd6d
Merge pull request #249 from dbrgn/anyhow
Use anyhow for error handling
2022-01-09 01:13:43 +01:00
Danilo Bargen
5262234846 Remove error module and clean up 2022-01-09 01:04:24 +01:00
Danilo Bargen
fd307757d7 Port cache and output modules to anyhow results 2022-01-09 01:04:07 +01:00
Danilo Bargen
405a2c9c8f Port config module to anyhow results 2022-01-09 01:04:07 +01:00
Danilo Bargen
9e97d454f0 Add anyhow dependency 2022-01-08 22:08:29 +01:00
Danilo Bargen
84277cc31e
Cache: Return error if HTTP client cannot be created (#247)
Apparently `Client::new` can panic (see #244), so let's return the error instead.
2022-01-08 22:01:36 +01:00
Danilo Bargen
eadfe97335 CHANGELOG: Mention the switch to Rustls 2022-01-02 20:51:44 +01:00
Danilo Bargen
47a4d6d7ca Docs: Remove note about patch concatenation (#245) 2022-01-02 02:04:52 +01:00
Danilo Bargen
b09f250370
Use clap 3 stable (#243) 2022-01-01 15:10:20 +01:00
Danilo Bargen
8228d31451 upload-asset script: Change release name 2022-01-01 14:43:58 +01:00
Danilo Bargen
81c30bfb77 Release v1.5.0 v1.5.0 2021-12-31 23:04:51 +01:00
Danilo Bargen
20b7c5c33f Run cargo update 2021-12-31 18:53:56 +01:00
Danilo Bargen
0ebf5aca87
Merge pull request #240 from dbrgn/ci-release
Release with GitHub Workflow
2021-12-31 18:28:54 +01:00
Danilo Bargen
d1c17f2eb6 Remove release-build.sh
We don't need it anymore now that we have a CI pipeline for release
binaries.
2021-12-31 18:20:17 +01:00
Danilo Bargen
c155b6f98d CI: Clean up release workflow and upload script
- Clean up scripts
- Create draft release before uploading assets
- Find release for current tag, don't simply pick the latest
- Add Windows builds
- Add checksums for binaries
2021-12-31 17:56:03 +01:00
alstjr7375
2007aa0c32 CI: Add initial release workflow 2021-12-31 00:29:28 +01:00
Danilo Bargen
e722b4f92e
Rename main branch (#239) 2021-12-30 22:39:27 +01:00
Danilo Bargen
7e44095e63
Merge pull request #238 from dbrgn/181-page-patch-chain
Concatenate page and patch bytes before processing
2021-12-30 22:11:12 +01:00
Danilo Bargen
ed3d1ea9af Always add empty line before concatenating patch file 2021-12-30 21:09:37 +01:00
Danilo Bargen
2b1167f19b Update custom patches docs 2021-12-30 00:12:51 +01:00
Danilo Bargen
fb40974616 Cache: Add tests for PageLookupResult::reader
Co-authored-by: Dalton Maahs <dalton.maahs@yourbind.com>
2021-12-30 00:01:31 +01:00
Danilo Bargen
0ef31d1f17 Concatenate page and patch bytes before processing
This way a patch file does not need a well-formed header anymore.

Fixes #181.
2021-12-30 00:01:31 +01:00
Danilo Bargen
0d1300c218
Merge pull request #236 from dbrgn/custom-pages-in-show-paths
Custom pages in show paths
2021-12-29 22:38:05 +01:00
Danilo Bargen
bbac67dd29
Merge pull request #237 from dbrgn/improved-docs
Improve docs.

Fixes #235, refs #218.
2021-12-24 21:56:17 +01:00
Danilo Bargen
ca844b35e9 Docs: Document custom pages and patches 2021-12-20 01:05:24 +01:00
Danilo Bargen
abeb5c3757 Docs: Add directories config section 2021-12-20 01:05:24 +01:00
Danilo Bargen
66255219fa Docs: Improve structure of config docs 2021-12-20 01:05:21 +01:00
Danilo Bargen
6508ec6ac6 Ensure that default custom_pages_dir ends with trailing slash 2021-12-20 00:26:19 +01:00
Danilo Bargen
00ec281b9b Include custom pages directory in --show-paths command 2021-12-20 00:25:48 +01:00
Danilo Bargen
f8785fbc3e
Merge pull request #233 from dbrgn/updates
Update dependencies
2021-12-11 19:22:00 +01:00
Danilo Bargen
876f390ac6 Clap: Enable colored error messages 2021-12-11 18:00:19 +01:00
Danilo Bargen
b726840246 Run cargo update 2021-12-11 18:00:19 +01:00
Danilo Bargen
69f4808214 Clap: Hide deprecated -o/--os argument from help 2021-12-11 18:00:19 +01:00
Danilo Bargen
25d771778a Update clap to 3.0.0-rc.4 2021-12-11 17:36:28 +01:00
Danilo Bargen
1a3624d011
Introduce command_or_file arg group (#230)
This allows to say "this command line parameter requires either a
command or a raw file".

Fixes #219.
2021-12-05 20:45:35 +01:00
Danilo Bargen
72d753c52b
Add "macos" alias for "osx" (#215)
The Apple computer operating system was renamed from "OS X" to "macOS"
in 2016. We should accept "macos" instead of "osx" in all our CLI APIs,
and the docs should also mention this alias instead of "osx".

For backwards compatibility and for compatibility with the tldr client
specification, we should still accept "osx" though.
2021-12-05 16:38:35 +01:00
Danilo Bargen
023a9d2079
Lowercase page names before lookup (#227) 2021-12-05 14:31:03 +01:00
Danilo Bargen
02a395ad13
Remove last traces of short -p pager flag (#228)
I missed some occurrences in #217.
2021-12-05 14:15:49 +01:00
Danilo Bargen
2684727eaa
Add helper functions: print_warning / print_error (#223)
These functions prepend a consistend prefix and they also use colors
(when enabled).

Messages are written to stderr.
2021-12-05 14:00:59 +01:00