Commit graph

53 commits

Author SHA1 Message Date
Danilo Bargen
07dc5c6bf4 Upgrade predicates and assert_cmd: 1 → 2 2021-09-12 21:12:00 +02:00
Danilo Bargen
a811788b31
Merge pull request #189 from niklasmohrin/simplify_highlight_commands
Refactor formatting code
2021-09-12 20:31:45 +02:00
Danny Mösch
1471b1d97b
Create cache directory path if it does not exist (#174)
Fixes #167
2021-09-12 20:28:22 +02:00
Niklas Mohrin
b216a63c64
Add integration test for non-ascii page rendering
Although this did not fail on old master, it is still an important case
to test. Actually, this test doesn't even break when introducing some
errors that fail i18n unit tests, unless the command name itself is
non-ascii.
2021-09-08 14:44:10 +02:00
Niklas Mohrin
22baa455b5
Update inkscape-default.expected 2021-09-08 14:44:09 +02:00
Wesley Klop
8051c3169a
Implement support for italics (#197)
Closes #146.
2021-09-06 17:01:55 +02:00
Marcin Puc
a4ac910e86 Add various small refactorings 2021-08-29 16:12:24 +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
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
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
Niklas Mohrin
2a6d09554b
Update tar-markdown.expected (#164) 2021-02-16 18:13:38 +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
Danny Mösch
1d529de260
Consider only standalone command names for styling (#157) 2021-01-29 21:22:52 +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
151d014f5d
Fix expected output for tar test (#144) 2020-10-13 09:45:21 +02:00
Bruno A. Muciño
d2b5614f1a Replace deprecated tempdir crate with tempfile crate (#139)
Fixes #134.
2020-09-04 11:59:10 +02:00
Lovecraftian Horror
dc6af5ad6c Add integration tests for the auto/never color options 2020-08-31 00:08:54 +02:00
Lovecraftian Horror
bc04e1ac00 Disable styling for --color auto if the output is being piped 2020-08-31 00:08:54 +02:00
Danilo Bargen
3597e344cb Apply rustfmt to codebase
Co-authored-by: Atul Bhosale <atul1bhosale@gmail.com>
Co-authored-by: Lovecraftian Horror <LovecraftianHorror@pm.me>
2020-08-30 18:39:29 +02:00
Niklas Mohrin
64e2c7b799
Update outdated expected output for the markdown test (#128)
Fixes #126.
2020-08-11 21:04:48 +02:00
Danilo Bargen
0b277c7515
Add test for pager warnings on Windows (#122) 2020-07-18 01:06:58 +02:00
Ilaï Deutel
a59182b6cc Use filetime instead of utime to set modification times in tests 2020-05-31 17:12:57 -07:00
Ilaï Deutel
ed1ba6beed Implement automatic cache updates 2020-05-31 17:12:57 -07:00
Danilo Bargen
06537c7218
Tests: Allow dead code for feature selection (#118)
These methods might be useful in the future, so I don't want to remove them even if they're unused. The warnings clutter diffs in CI though.
2020-05-08 22:40:34 +02:00
michaeldel
a45c19647f
Move cache age warning to stderr (#114)
Fixes #113
2020-04-16 21:42:02 +02:00
michaeldel
5dd9457cf4
Make list option comply with official spec (#112)
Separate page list with newlines, not with commas.

From the official spec:

> Additional decoration MAY be printed if the standard output is a TTY.
> If not, then the output MUST not contain any additional decorations.
> For example a page list MUST be formatted with 1 page name per line
> (to enable easy manipulation using standard CLI tools such as grep etc.).
2020-04-16 11:56:14 +02:00
Danilo Bargen
39b1d19d66
Fix integration tests (#110)
The tar tldr page was updated.
2020-04-10 23:49:39 +02:00
Danilo Bargen
ed3e4baac5
Fix integration test (#103)
It broke because the `tar` tldr page was changed upstream :)
2020-02-28 00:20:17 +01:00
Danilo Bargen
23d7301b53
Merge pull request #95 from Plommonsorbet/render_as_markdown_option
Add -m / --markdown option for raw rendering
2020-01-22 23:06:03 +01:00
Isak Johansson
6719acb4f2 Add -m / --markdown option for raw rendering
New option to render as markdown, not with ANSI escape codes.
This is useful for when you want to open it up in a pager which doesn't
support ANSI escape codes by default. In my use case it allows me to
open it inside vim without having to use an addon to convert ANSI escape
codes to colours.
2020-01-22 22:54:11 +01:00
Hugo Locurcio
0d00e60af0 Tweak the outdated cache warning message (#97)
This makes it display in yellow (instead of red) as it's
more of a *warning* message than an *error* message.
2020-01-07 09:16:40 +01:00
Danilo Bargen
6810693655 Document compact output option in README 2019-10-03 23:56:07 +02:00
jdvr
0879116a45 Add pager support 2019-03-11 10:52:12 +01:00
Jason Liquorish
265ed66d7d Add Windows support 2019-02-05 09:32:13 -08:00
Jonathan Dahan
91c7a412f0 Add support for spaces in commands (#75)
For example "git commit".

Fixes #74.
2019-01-14 09:28:48 +01:00
Danilo Bargen
240e36a389
Switch from assert_cli to assert_cmd (#66) 2018-11-21 22:26:14 +01:00
Danilo Bargen
f1988a645b Fix loading of configfile
- Don't require config file to exist for `--config-path` flag
- Make `--config-path` option pass-through
- Add a test for the `--config-path` flag
2018-10-22 18:03:49 +02:00
Danilo Bargen
e2d61e3ef2 Change wording of outdated cache message 2018-10-22 17:48:20 +02:00
equal-l2
ac9db25691 Run rustfmt 2018-10-21 14:49:01 +02:00
Jonathan Dahan
8784b55ba8 Add --quiet flag to surpress non-error output (#48) 2018-09-18 21:12:21 +02:00
Danilo Bargen
f21e885d85 Syntax config path -> config path 2018-09-16 00:41:58 +02:00
Danilo Bargen
7621bb107e Change default styling
Make it a bit more colorful, like the previous style
2018-09-16 00:41:58 +02:00
Lukas Bergdoll
0c0b8d8f57 Generalize config
Else indentation
Serde rename
Generalize config, rename and make style member
2018-09-16 00:41:53 +02:00
Lukas Bergdoll
66b8a3daca Add syntax config support 2018-09-16 00:40:25 +02:00
Danilo Bargen
336bd60ee5 Fix integration tests
Introduce the `assert_cli` crate which is a more robust way of testing
the binary. Tests also look much cleaner.

Thanks @anderejd for suggesting that crate!
2017-12-23 00:03:35 +01:00