Commit graph

111 commits

Author SHA1 Message Date
Danilo Bargen
fd9e36277f Disable clippy::too_many_lines warning 2020-09-03 22:46:53 +02:00
Lovecraftian Horror
1b8062e0af Switch --color always to force styling 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
Lovecraftian Horror
be79c924f6 Disable styling for --color auto when NO_COLOR is set 2020-08-31 00:08:54 +02:00
Lovecraftian Horror
f757389df9 Add flag for specifying color preference 2020-08-31 00:08:54 +02:00
Lovecraftian Horror
baffd1ea4d Apply enable_styles config to stale cache warning
This change makes the color for the "stale cache" warning follow
`enable_styles`, like the rest of the styling.
2020-08-30 21:17:11 +02:00
Danilo Bargen
e507343f5d
CI: Run clippy with Rust 1.46 (#132) 2020-08-30 19:55:38 +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
Ilaï Deutel
2f2fe4dd92 Fix serde default for updates.auto_update_interval_hours 2020-05-31 17:12:57 -07:00
Ilaï Deutel
ed1ba6beed Implement automatic cache updates 2020-05-31 17:12:57 -07: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
a594b0013e
Fix clippy warnings (#105) 2020-02-28 01:11:10 +01:00
Danilo Bargen
3e3403806c Require Rust 1.39 (was 1.36) 2020-02-28 00:38:53 +01:00
Danilo Bargen
04e61080d2 Upgrade reqwest
This reduces the dependency tree from 333 to 188 entries, mostly because
some reqwest features were disabled :)
2020-02-28 00:20:37 +01:00
Jesús Trinidad Díaz Ramírez
055758dba8
Fix clippy warnings (#101) 2020-02-06 15:43:00 +01:00
Danilo Bargen
22255bf80c
Merge pull request #99 from dbrgn/github-actions
CI: Switch to GitHub Actions
2020-01-22 23:55:19 +01:00
Danilo Bargen
bcdfd5e9a8 Disable pager feature on Windows 2020-01-22 23:44:27 +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
Bruno Heridet
94c0e99693 Fix typo in error message for flag_seed_config (#91) 2019-10-29 13:54:06 +01:00
Danilo Bargen
74c37193e3 Use non-deprecated trim functions 2019-10-04 01:18:36 +02:00
Danilo Bargen
7460cdac6d Remove unused import 2019-10-04 01:18:36 +02:00
Korrat
7f8cbb01e5 Suppress empty lines for compact output 2019-10-03 11:55:07 +02:00
Korrat
a9f2a4c132 Add config field for compact output 2019-10-03 11:47:20 +02:00
Danilo Bargen
4304e2e610 Paging: Fix bug that I introduced during merge 2019-03-11 11:12:28 +01:00
Danilo Bargen
5215493720 Don't override display config when styles are disabled 2019-03-11 11:12:28 +01:00
Danilo Bargen
410e96ef7f Ensure that all config keys are optional
Without this change, a config without a [display] section
would fail to parse.
2019-03-11 11:12:22 +01:00
jdvr
0879116a45 Add pager support 2019-03-11 10:52:12 +01:00
Gabriel Martinez
495c3e97d9 Support colors on Windows using ansi_term
We try to enable ANSI color support on Windows using the new APIs.
If that succeeds, we print colors as usual. If it fails, we disable
styles completely.
2019-02-09 21:44:10 -08: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
9548f1dd1b
More clippy pedantism! (#70) 2018-12-07 12:25:25 +01:00
Danilo Bargen
f5e081ab68
Rust 2018 (#69) 2018-12-07 11:42:39 +01:00
Ivan Smirnov
f3cabddd0d Add (back) support for proxies (#68)
Fixes #65
2018-11-22 16:09:54 +01:00
Jan Christian Gruenhage
db2fe596ca Move from curl to reqwest
Fixes #60
2018-11-19 10:53:44 +01:00
Danilo Bargen
e73261542c
OS detection: Treat BSDs as "osx" (#58)
Since macOS is also a BSD under the hood, this will probably yield
better results.
2018-10-28 22:09:56 +01:00
Danilo Bargen
1dc3e0c8c4
Print detected OS with -v / --version (#57) 2018-10-28 22:09:44 +01:00
Danilo Bargen
bd7ee937de
Fix logging initialization (#56) 2018-10-28 21:52:55 +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
6fcb1e17de Impl Display for TealdeerError 2018-10-22 18:03:07 +02:00
Danilo Bargen
e2d61e3ef2 Change wording of outdated cache message 2018-10-22 17:48:20 +02:00
equal-l2
78195a2589 Apply clippy suggestions 2018-10-21 14:49:25 +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
1f6e7404a1 Define defaults for config fields
This allows the user to omit the fields when creating a config file.
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
Danilo Bargen
8771db1e73 Rename "highlight" style to "command_name" 2018-09-16 00:41:58 +02:00