Commit graph

307 commits

Author SHA1 Message Date
Niklas Mohrin
d5d3d20451
Run clippy on stable with msrv setting instead of on msrv (#200) 2021-08-17 19:40:35 +02:00
Niklas Mohrin
123c809630
Merge pull request #163 from niklasmohrin/hyperfine 2021-07-30 15:46:03 +02:00
Niklas Mohrin
d1d36a961a
Update README.md to include updated benchmark results 2021-07-30 15:31:46 +02:00
Niklas Mohrin
e7c5daa9b7
Add Dockerfile for benchmarks 2021-07-30 15:31:17 +02:00
Rithvik Vibhu
187214e39e
Remove AUR links for tealdeer and tealdeer-bin (#196)
The package is now in the community repos.
2021-07-19 13:57:16 +02:00
bl-ue
a5aa822d12
README: Update @SShrike → @severen (#193) 2021-06-22 13:31:51 +02:00
Danilo Bargen
767b62d493
Merge pull request #187 from sondr3/performance-fixes
- Use unbuffered I/O for faster printing to stdout
- Replace OpenSSL with Rustls
2021-05-26 09:40:58 +02:00
Sondre Nilsen
feb20d8c5c Add WriteError type, convert print_lines to return a result 2021-05-25 16:38:28 +02:00
Sondre Nilsen
22693c09ba Use rustls for TLS to avoid dynamic linking 2021-05-25 16:38:00 +02:00
Sondre Nilsen
06f771f64d Use unbuffered IO for faster printing to stdout 2021-05-25 16:37:57 +02:00
Danilo Bargen
a72ba4a7a9
Merge pull request #191 from dbrgn/msrv
Update MSRV policy
2021-05-13 14:45:05 +02:00
Danilo Bargen
e32ce77c0c CI: Bump Rust version 2021-05-13 14:31:22 +02:00
Danny Mösch
b6342633cd
Use which instead of tar as reference tldr page in tests (#192)
The page for `tar` changes pretty frequently. `which` was last updated in 2018 and is a rather simple command overall. So it is less likely that the reference in the repository has to be updated as often as the one for `tar`.
2021-05-13 14:12:11 +02:00
Cameron Tod
25f736564d
Docs: Fix packet/package typo (#185) 2021-05-13 00:25:41 +02:00
Danilo Bargen
3223fec5ee Update MSRV policy
As discussed in #190.
2021-05-13 00:06:45 +02:00
Dalton
4d4c7b6a5d
Fix clippy warnings (#188)
* Fix clippy warnings
* Update toolchain for CI workflows fmt and clippy
2021-05-11 13:28:26 +02:00
Dalton
388deac079
Send all progress logging messages to stderr (#171)
- Change logging messages to go to stderr
- Updated tests to expect these messages in stderr instead of stdout
- Changed test_markdown_rendering to no longer rely on the tldr pages repo
2021-05-10 09:17:13 +02:00
Danny Mösch
a92e974ac2
Update expected output for 'tar' tldr page (#186) 2021-05-09 18:05:50 +02:00
Dalton
0fce79f8ed
Add unit tests for custom pages / patches (#183) 2021-04-23 20:06:44 +02:00
ギャラ
42816d3d09
Fix order of derive helper attributes (#179) 2021-04-19 15:09:07 +02:00
Danny Mösch
2a304b17f2
Fix clippy warnings (#173) 2021-04-18 19:27:25 +02:00
Dalton
07c715656f
Support custom pages and patches (#142)
Allow adding, overriding and extending custom pages.

Fixes #98.
2021-04-18 19:22:41 +02:00
Danny Mösch
7232bdd898
Allow SunOS override (#176)
Fixes #82.
2021-04-14 20:55:27 +02:00
Danny Mösch
49f151a605
Remove 'extern crate' declarations (#175)
Cargo.toml specifies Rust Edition 2018 which does not require 'extern crate' anymore.
2021-04-10 21:33:48 +02:00
Michael Cho
071680800a
zsh-completion: fix issue with [.md, add basic -L completion, remove extra _files args (#168)
- Use array `commands=(...)` and `_describe` to deal with '[.md' & empty cache scenario.  Fixes #166
- Hide `tldr --list` stderr (`2>/dev/null`) which breaks completion with empty cache
- Remove `sed` since #112 changed commas to newlines
- Add new `sed`-equivalent replacement (`:` -> `\:`) using native [ZSH `${name//pattern/repl}`](http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion) since colon is special character in ZSH completions
- Add basic support for `-L, --language` flag from #125. In future, can consider adding extra completions maybe based on caches `pages.{lang}` folders.
- Remove extraneous completion of file names for positional arguments (i.e. `'*:file:_files'`)
2021-03-21 15:55:23 +01:00
Niklas Mohrin
2a6d09554b
Update tar-markdown.expected (#164) 2021-02-16 18:13:38 +01:00
Danilo Bargen
663926cc0e
Merge pull request #162 from dbrgn/show-dirs
Implement new --show-dirs command
2021-02-05 00:32:20 +01:00
Danilo Bargen
cb57ac1d5d Require Rust 1.41 (was 1.40)
This is required for Result::map_or_else.

Additionally, run clippy with 1.41 as well. Otherwise it reports
suggestions that are not compatible with 1.41.
2021-02-05 00:12:57 +01:00
Danilo Bargen
ca15279386 Show reason for choice of a certain cache/config dir 2021-02-04 23:53:14 +01:00
Danilo Bargen
978debe6ae Implement new --show-dirs command
The command prints out the different directories (config, cache, etc)
used by tealdeer.
2021-01-30 21:32:39 +01:00
Danilo Bargen
4e1876ac88 Fix typo in code comment 2021-01-29 22:14:37 +01:00
Danny Mösch
1d529de260
Consider only standalone command names for styling (#157) 2021-01-29 21:22:52 +01:00
Danilo Bargen
32ff6c0e3c
Merge pull request #161 from dbrgn/multilanguage-improvements
Language support improvements
2021-01-29 21:14:53 +01:00
Danilo Bargen
2e1e0006b2 Avoid cloning in Dedup::clear_duplicates
Co-authored-by: Niklas Mohrin <niklas.mohrin@gmail.com>
2021-01-29 14:23:15 +01:00
Danilo Bargen
5d8448c442 Require Rust 1.40 (was 1.39) 2021-01-29 12:16:38 +01:00
Danilo Bargen
127124eded Optimize get_languages function
- Replace `Result` parameters with `Option`
- Replace `HashSet` for deduplication with linear search based approach
- Avoid intermediate allocations

This reduces the instruction count in release mode by almost 50%.
2021-01-29 12:05:01 +01:00
Danilo Bargen
e5d359b935 Language tests: Group into module 2021-01-29 00:08:23 +01:00
Niklas Mohrin
1db4b409bc Add support for multiple languages (#125)
The implementation follows the tldr-pages client spec:
https://github.com/tldr-pages/tldr/blob/master/CLIENT-SPECIFICATION.md#language

Fixes #96
2021-01-29 00:00:10 +01:00
tveness
0c75e34007
Fix tar markdown rendering test (#159)
tldr-pages repository changed file
https://github.com/tldr-pages/tldr/blob/master/pages/common/tar.md
and so test was failing
2021-01-13 23:32:02 +01:00
Danilo Bargen
c632407a25 README: Move up link to docs 2020-11-15 00:03:48 +01:00
Danilo Bargen
b1a08af00a Link to docs in Cargo.toml 2020-11-15 00:03:15 +01:00
Danilo Bargen
1ebb80bb14
Merge pull request #155 from dbrgn/docs-cache-config
Document location of cache directory. Fixes #151.
2020-11-15 00:02:49 +01:00
Danilo Bargen
931a5fc13c Docs: Document location of cache directory 2020-11-15 00:00:15 +01:00
Danilo Bargen
c33c146a17 Docs: Add README 2020-11-14 23:55:49 +01:00
Danilo Bargen
6d07e78613
Remove xdg dependency (#152)
It's not being used anymore.
2020-11-08 13:15:52 +01:00
Danilo Bargen
dff8da40a5 Docs: Add screenshot to intro page 2020-11-01 01:52:01 +01:00
Danilo Bargen
5ca8461dd8
Merge pull request #150 from dbrgn/mdbook
The README has gotten really long, it's getting hard to read. Instead, extract user docs into an mdbook page deployed through GH pages.
2020-11-01 01:49:37 +01:00
Danilo Bargen
e24d86c900 Deploy docs through CI 2020-11-01 01:40:04 +01:00
Danilo Bargen
ddeb81b249 Add mdbook documentation 2020-11-01 01:39:47 +01:00
Danilo Bargen
e35dd5e30c README: Simplify color docs 2020-11-01 00:26:19 +01:00