commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
5d9647bbe7dc97e9506f21b0346181a2e194e2ce
Yuheng Chen
2015-05-28T18:57:41
Add scan_tag_directive_value
diff --git a/src/parser.rs b/src/parser.rs index fcbf37c..b2a35cb 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -291,7 +291,7 @@ impl<T: Iterator<Item=char>> Parser<T> { return Ok(Event::StreamEnd); }, TokenType::VersionDirectiveToken(..) - | TokenType::TagD...
2
48
10
a0165704c8ee93df9f4e2f0b99d8c830041f6ce2
Yuheng Chen
2015-05-28T14:19:06
Fix unicode escape
diff --git a/src/scanner.rs b/src/scanner.rs index 00ba30d..734c7f8 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -951,7 +951,14 @@ impl<T: Iterator<Item=char>> Scanner<T> { '"' => string.push('"'), '\'' => string.push('\''), '...
1
8
1
ee327f76f99e193035c15800cf80d787f69d53f7
Yuheng Chen
2015-05-28T14:07:59
Add VersionDirectiveToken
diff --git a/src/parser.rs b/src/parser.rs index 8bc2918..1108e2d 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -82,8 +82,12 @@ impl<T: Iterator<Item=char>> Parser<T> { self.token = self.scanner.next(); } if self.token.is_none() { - return Err(ScanError::new(self.scanner.ma...
2
178
8
be438019a30632727e0000354e9f79c448ba536e
Yuheng Chen
2015-05-27T15:18:38
Add flow_sequence_entry_mapping
diff --git a/src/parser.rs b/src/parser.rs index c72b786..9bffdad 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -230,6 +230,10 @@ impl<T: Iterator<Item=char>> Parser<T> { State::IndentlessSequenceEntry => self.indentless_sequence_entry(), + State::FlowSequenceEntryMappingKey => self.flow...
1
53
0
d13adbbc363c0b73ffc66765a10e9428794a7ce6
Yuheng Chen
2015-05-27T13:34:52
Add flow_mapping_key
diff --git a/src/parser.rs b/src/parser.rs index dead8e4..644121d 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -222,6 +222,10 @@ impl<T: Iterator<Item=char>> Parser<T> { State::FlowSequenceFirstEntry => self.flow_sequence_entry(true), State::FlowSequenceEntry => self.flow_sequence_entry(f...
1
73
1
2ce0fbf33efd5576664184d330a4283eb617bf7a
Yuheng Chen
2015-05-27T08:35:13
Add indentless_sequence_entry
diff --git a/src/parser.rs b/src/parser.rs index 4ffab44..dead8e4 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -199,7 +199,7 @@ impl<T: Iterator<Item=char>> Parser<T> { fn state_machine(&mut self) -> ParseResult { let next_tok = self.peek(); - //println!("cur_state {:?}, next tok: {:?}", sel...
2
65
3
1fe18782aa37f03307d2a33e95680d45f844b63d
Yuheng Chen
2015-05-26T16:29:40
Add block_scalar
diff --git a/src/parser.rs b/src/parser.rs index 8fa31f4..cb95203 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -59,6 +59,10 @@ pub struct Parser<T> { token: Option<Token>, } +pub trait EventReceiver { + fn on_event(&mut self, ev: &Event); +} + pub type ParseResult = Result<Event, ScanError>; impl<T:...
3
201
2
ad63b0c67aee272954ff7639be68254dc50472be
Yuheng Chen
2015-05-25T11:31:33
Add scanner unit tests
diff --git a/src/parser.rs b/src/parser.rs index caafb45..3e2b069 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -490,11 +490,13 @@ a4: - a2 - 2 a5: 'single_quoted' -a5: \"double_quoted\" +a6: \"double_quoted\" +a7: 你好 ".to_string(); let mut parser = Parser::new(s.chars()); let out = ...
3
379
46
16d3c6db810c7673d8daa71a3b7a96c7da455ed1
Yuheng Chen
2015-05-25T05:54:39
Add scalar coersion
diff --git a/src/parser.rs b/src/parser.rs index d90dc43..caafb45 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -130,9 +130,20 @@ impl<T: Iterator<Item=char>> Parser<T> { fn load_node(&mut self, first_ev: &Event) -> Result<Yaml, ScanError> { match *first_ev { - Event::Scalar(ref v, _) => ...
2
21
11
fa24c8107e0060bb6af46bc9a48bfcd658b3fb67
Yuheng Chen
2015-05-24T19:29:52
Add parse for Yaml
diff --git a/Cargo.toml b/Cargo.toml index 82b30d2..d7dd718 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,3 @@ name = "yaml-rust" version = "0.1.0" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] - -[dependencies] -regex = "*" diff --git a/src/lib.rs b/src/lib.rs index 1241d22..6dd2656 100644 --- a/src/li...
3
6
15
460122144a0b471b28804e35d837f2f5abd30da4
Yuheng Chen
2015-05-24T19:21:53
Add scan_flow_scalar
diff --git a/src/parser.rs b/src/parser.rs index ffe97d9..d90dc43 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -37,7 +37,7 @@ pub enum Event { DocumentStart, DocumentEnd, Alias, - Scalar(String), + Scalar(String, TScalarStyle), SequenceStart, SequenceEnd, MappingStart, @@ -46,7 ...
3
210
19
bbaa3f474f8ae2b707fbd828342e9d809fd7ad6b
Yuheng Chen
2015-05-24T18:16:28
Add Index trait for YAML node
diff --git a/src/yaml.rs b/src/yaml.rs index 4e5e4a1..1065421 100644 --- a/src/yaml.rs +++ b/src/yaml.rs @@ -1,4 +1,5 @@ -use std::collections::{HashMap, BTreeMap}; +use std::collections::BTreeMap; +use std::ops::Index; use std::string; use regex::Regex; @@ -12,6 +13,7 @@ pub enum Yaml { Array(self::Array), ...
1
44
2
69fb813b131baa5ab7392654170ee6a3b8b9ca58
Yuheng Chen
2015-05-24T17:34:18
Add yaml value coerce
diff --git a/Cargo.toml b/Cargo.toml index d7dd718..82b30d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,3 +2,6 @@ name = "yaml-rust" version = "0.1.0" authors = ["Yuheng Chen <yuhengchen@sensetime.com>"] + +[dependencies] +regex = "*" diff --git a/src/lib.rs b/src/lib.rs index a824d7d..1241d22 100644 --- a/src/li...
5
113
30
43652461d737d8f5ad41cc8d4688b597afc254d2
Yuheng Chen
2015-05-24T06:38:54
fix lookahead spelling
diff --git a/src/scanner.rs b/src/scanner.rs index dd28f16..adf6518 100644 --- a/src/scanner.rs +++ b/src/scanner.rs @@ -166,7 +166,7 @@ impl<T: Iterator<Item=char>> Scanner<T> { } } - fn lookhead(&mut self, count: usize) { + fn lookahead(&mut self, count: usize) { if self.buffer.len() >=...
1
10
10
9d301b180be260f89ff008357aa605e1a819a9e7
Yuheng Chen
2015-05-24T06:29:10
Add empty_scalar()
diff --git a/src/parser.rs b/src/parser.rs index 104f6a6..242a540 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -43,6 +43,12 @@ pub enum Event { MappingEnd } +impl Event { + fn empty_scalar() -> Event { + Event::Scalar(String::new()) + } +} + #[derive(Debug)] pub struct Parser<T> { scann...
1
11
5
2e6ea907c3247d6dcee14884d651a05093786101
Guillaume Gomez
2020-07-01T19:14:45
Update crate version
diff --git a/Cargo.toml b/Cargo.toml index 4823f83..4975cec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "doc-comment" -version = "0.4.0" +version = "0.4.1" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] documentation = "http://docs.rs/crate/doc-comment"
1
1
1
507d46a5a61ca9fd104e47dd2b59656d5ce5b7a9
Guillaume Gomez
2020-07-01T19:14:33
Update doc examples
diff --git a/src/lib.rs b/src/lib.rs index 076ea9a..cfa6adb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -29,7 +29,7 @@ //! extern crate doc_comment; //! //! // When running `cargo test`, rustdoc will check this file as well. -//! doc_comment::doctest!("../README.md"); +//! doc_comment::doctest!{ "../README.md" } //...
1
2
2
92556b15406b0008324c50e8c6a509d44c2240b3
Guillaume Gomez
2020-07-01T09:58:32
Fix item parsing/rendering and add debug features
diff --git a/Cargo.toml b/Cargo.toml index 8751ed9..4823f83 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,3 +15,6 @@ proc-macro = true [badges] travis-ci = { repository = "GuillaumeGomez/doc-comment" } + +[features] +debug = [] diff --git a/src/lib.rs b/src/lib.rs index e0e1b6f..076ea9a 100644 --- a/src/lib.rs ++...
2
60
44
a33b582146b04f350741590c11ebf7416c0e26f4
Guillaume Gomez
2020-07-01T09:36:09
Fix pattern bindings for 1.38
diff --git a/src/lib.rs b/src/lib.rs index 29ce121..e0e1b6f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -184,7 +184,7 @@ fn parse_macro_call( let path = Path::new(&l_s); out.push_str(&include_file(&ident, &path, includes)); } - To...
1
6
6
dfeb26372b255abe511a16f281240d24c79bc377
Guillaume Gomez
2020-06-30T21:44:31
Use doc_comment instead of doctest for testing for the moment
diff --git a/ci-tests/lib.rs b/ci-tests/lib.rs index ce8b4f5..449e59a 100644 --- a/ci-tests/lib.rs +++ b/ci-tests/lib.rs @@ -1 +1,3 @@ -doc_comment::doctest!("../README.md"); +// I don't use extern here because it's not stable yet as it seems (rustc 1.44.1) +#[doc_comment::doc_comment(include_str!("../README.md"))] +ex...
1
3
1
c68052cd084b9f1a1b40dd10123f7fd3021c175a
Guillaume Gomez
2020-06-30T21:39:47
Update crate version
diff --git a/Cargo.toml b/Cargo.toml index 6754f94..8751ed9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "doc-comment" -version = "0.3.3" +version = "0.4.0" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] documentation = "http://docs.rs/crate/doc-comment"
1
1
1
5adcba88442c0c6b39e209eadf98211ba5da2fb6
Guillaume Gomez
2020-06-30T20:46:55
Start of proc-macro implementation
diff --git a/Cargo.toml b/Cargo.toml index ce96e58..6754f94 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,14 +8,10 @@ repository = "https://github.com/GuillaumeGomez/doc-comment" readme = "README.md" license = "MIT" description = "Macro to generate doc comments" -build = "build.rs" [lib] name = "doc_comment" +p...
3
416
229
9aed6bf62cd3088ffed731b18c4877d3d6bb6610
Guillaume Gomez
2020-03-17T14:50:58
Update crate version
diff --git a/Cargo.toml b/Cargo.toml index df45d21..ce96e58 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "doc-comment" -version = "0.3.2" +version = "0.3.3" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] documentation = "http://docs.rs/crate/doc-comment"
1
1
1
8cff4ad171f80aff961836b8992c4ced7d4b1c1c
Guillaume Gomez
2020-03-17T14:50:44
Improve crate documentation
diff --git a/src/lib.rs b/src/lib.rs index bc0ff17..620b246 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,7 +11,61 @@ //! The point of this (small) crate is to allow you to add doc comments from macros or //! to test external markdown files' code blocks through `rustdoc`. //! -//! It's especially useful when gener...
1
55
37
5561a02eba786bdf85e583e711fc285df5a5d953
Guillaume Gomez
2020-03-07T20:03:58
Update crate version
diff --git a/Cargo.toml b/Cargo.toml index 79494b4..df45d21 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "doc-comment" -version = "0.3.1" +version = "0.3.2" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] documentation = "http://docs.rs/crate/doc-comment"
1
1
1
d4440a94c20f7b9c53cd3e06cb4a0109dbb78eb8
Guillaume Gomez
2019-04-28T14:40:42
Update crate version
diff --git a/Cargo.toml b/Cargo.toml index 3f62b51..79494b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "doc-comment" -version = "0.3.0" +version = "0.3.1" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] documentation = "http://docs.rs/crate/doc-comment"
1
1
1
dabec45a19447b09646d9925c68fcb139b2d25a9
Guillaume Gomez
2019-04-16T11:02:27
Update version
diff --git a/Cargo.toml b/Cargo.toml index 868e965..c02a3f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "doc-comment" -version = "0.2.4" +version = "0.3.0" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] documentation = "http://docs.rs/crate/doc-comment"
1
1
1
8ba43e5c22268a5892be8d86b2eed00f7a3059ca
Guillaume Gomez
2019-04-16T11:31:48
Set edition to 2018
diff --git a/Cargo.toml b/Cargo.toml index b6a01c6..868e965 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ repository = "https://github.com/GuillaumeGomez/doc-comment" readme = "README.md" license = "MIT" description = "Macro to generate doc comments" +edition = "2018" [lib] name = "doc_comment"
1
1
0
9ec82c27002fe0c7a0265d3160db956028f6b293
Guillaume Gomez
2019-04-16T11:02:21
fix doctest macro
diff --git a/src/lib.rs b/src/lib.rs index 96e4506..0f60c77 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -173,14 +173,13 @@ macro_rules! doc_comment { /// doctest!("../README.md", another); /// # fn main() {} /// ``` +#[cfg(not(feature = "no_core"))] #[macro_export] macro_rules! doctest { ($x:expr) => { - ...
1
3
4
2eebdf7fcbd9f4d4a469f7dc71cbb7dc0a5ea608
Guillaume Gomez
2019-04-15T16:15:40
Update version
diff --git a/Cargo.toml b/Cargo.toml index c3221b8..b6a01c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "doc-comment" -version = "0.2.3" +version = "0.2.4" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] documentation = "http://docs.rs/crate/doc-comment"
1
1
1
d130619dcc2ba7abeaf948e35ecc1267be27dd38
Guillaume Gomez
2019-04-15T14:22:48
Fix for 2018 edition
diff --git a/src/lib.rs b/src/lib.rs index a8f506e..96e4506 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -176,9 +176,11 @@ macro_rules! doc_comment { #[macro_export] macro_rules! doctest { ($x:expr) => { - doc_comment!(include_str!($x)); + #[doc = $x] + extern {} }; ($x:expr, $y:ident) => ...
1
4
2
687b26e6dc52e4df5e6c5db139bf67930b282c29
Guillaume Gomez
2019-04-15T11:54:54
update version
diff --git a/Cargo.toml b/Cargo.toml index a2b4d3e..c3221b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "doc-comment" -version = "0.2.2" +version = "0.2.3" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] documentation = "http://docs.rs/crate/doc-comment"
1
1
1
0d997eb05b675f09183e873f8d752a65dcf18f3d
Guillaume Gomez
2019-04-15T11:15:49
Allow to pass second parameter to use as module name
diff --git a/src/lib.rs b/src/lib.rs index 6ccf0e6..a8f506e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -157,7 +157,7 @@ macro_rules! doc_comment { }; } -/// This macro provdes a simpler way to test an outer markdown file. +/// This macro provides a simpler way to test an outer markdown file. /// /// # Exampl...
1
7
1
e560667761548a8d109e02f8d35635f8cc912b7d
Guillaume Gomez
2019-04-13T16:21:51
Update version
diff --git a/Cargo.toml b/Cargo.toml index 8236717..a2b4d3e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "doc-comment" -version = "0.2.1" +version = "0.2.2" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] documentation = "http://docs.rs/crate/doc-comment"
1
1
1
bf1b21504c854d1165a5fa1ad0330e36d55038c4
Guillaume Gomez
2019-04-13T16:11:41
Update version
diff --git a/Cargo.toml b/Cargo.toml index 3749f46..8236717 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "doc-comment" -version = "0.2.0" +version = "0.2.1" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] documentation = "http://docs.rs/crate/doc-comment"
1
1
1
8d30f5f3baee0d7409d194961a73d32e2897818e
Jonas Schievink
2019-04-13T16:09:10
Add repo link to Cargo.toml The repo is hard to find otherwise
diff --git a/Cargo.toml b/Cargo.toml index d7bbb00..3749f46 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,6 +4,7 @@ version = "0.2.0" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] documentation = "http://docs.rs/crate/doc-comment" +repository = "https://github.com/GuillaumeGomez/doc-comment" readme =...
1
1
0
e210d25e7bfd048b43071e8f9ef3e99295e5ac50
Guillaume Gomez
2019-04-13T12:18:13
Update version
diff --git a/Cargo.toml b/Cargo.toml index 69d782f..d7bbb00 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "doc-comment" -version = "0.1.4" +version = "0.2.0" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] documentation = "http://docs.rs/crate/doc-comment"
1
1
1
6909f4944a114cb65be08802b6a748417c23e499
Guillaume Gomez
2019-04-13T12:17:56
Add doctest macro
diff --git a/src/lib.rs b/src/lib.rs index 5504da7..6ccf0e6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -116,7 +116,35 @@ //! doc_comment!(include_str!("../README.md")); //! # fn main() {} //! ``` +//! +//! Please note that can also use the `doctest!` macro to have a shorter way to test an outer +//! file: +//! +//!...
1
48
0
6191b1c160e4c2dff92d515599994dbcfeb9fefd
Guillaume Gomez
2019-04-12T17:57:51
Update version
diff --git a/Cargo.toml b/Cargo.toml index 4e56b6a..69d782f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "doc-comment" -version = "0.1.3" +version = "0.1.4" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] documentation = "http://docs.rs/crate/doc-comment"
1
1
1
9e7dcf75a2dc2fad23e452c2724639e814d81f5b
Guillaume Gomez
2019-04-12T17:57:41
Improve documentation
diff --git a/src/lib.rs b/src/lib.rs index 4db96d2..5504da7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,7 +8,8 @@ #![cfg_attr(feature = "no_core", no_core)] #![cfg_attr(not(feature = "no_core"), no_std)] -//! The point of this (small) crate is to allow you to add doc comments from macros. +//! The point of this ...
1
19
3
9f620bc97840a10e2ff884ae7a4e88bff72bbedc
Guillaume Gomez
2019-04-12T15:02:51
Update version
diff --git a/Cargo.toml b/Cargo.toml index 9546f30..4e56b6a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "doc-comment" -version = "0.1.2" +version = "0.1.3" authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"] documentation = "http://docs.rs/crate/doc-comment"
1
1
1
dfbc97286a1b62480cedf5e7874b3cf4700d5e97
Guillaume Gomez
2019-04-12T15:00:57
Allow to not pass any type
diff --git a/src/lib.rs b/src/lib.rs index ab50a6d..4db96d2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -90,9 +90,23 @@ //! # fn main() {} //! //! Now each struct has doc which match itself! +//! +//! It's also possible to generate doc comments without passing a type as follows: +//! +//! ``` +//! #[macro_use] +...
1
14
0
6dc655fca6d5bf394fb27254229e2538b161afbd
Chines Wang
2024-01-10T12:40:18
impl: switch to relaxed memory ordering Relaxed is sufficient here as printed merely serves as an atomic signal in a multithreaded context, providing atomicity but not synchronization. PR #82
diff --git a/src/lib.rs b/src/lib.rs index 640e212..9e6371f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1143,7 +1143,7 @@ impl BufferWriter { } let mut stream = self.stream.wrap(self.stream.get_ref().lock()); if let Some(ref sep) = self.separator { - if self.printed.load(Ordering:...
1
2
2
da784a92bfb69f011322419758a93e88e86f639e
Andrew Gallant
2023-11-13T18:40:28
api: add Clone impls There's no reason not to have these. I suspect I didn't add them originally because types like `std::io::Stdout` don't implement `Clone`. And so, the structures that contain them can't either. But that's not true of all `std::io::Write` implementations.
diff --git a/src/lib.rs b/src/lib.rs index 06d1f79..640e212 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1179,11 +1179,11 @@ impl BufferWriter { /// method, which will take color preferences and the environment into /// account. However, buffers can also be manually created using `no_color`, /// `ansi` or `console` ...
1
4
4
11b93e262e1749b307a416e6e7b8ae62d4f35bb6
Andrew Gallant
2023-09-18T23:58:33
doc: remove recommendation for `atty` We replace it with a recommendation to use the standard library. Fixes #73
diff --git a/src/lib.rs b/src/lib.rs index 062df18..900ebd3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -85,21 +85,21 @@ is via libc's [`isatty`](https://man7.org/linux/man-pages/man3/isatty.3.html) function. Unfortunately, this notoriously does not work well in Windows environments. To -work around that, the curren...
1
7
7
fb5fb8bb62b0cf8a9623da557d2a4ed6a27b8c9f
Andrew Gallant
2023-01-15T13:35:30
impl: some small cleanups In particular, this gets rust-analyzer to stop complaining. We don't bother with much else, including cleanups that require MSRV bumps, mostly because it doesn't seem worth it to me.
diff --git a/src/lib.rs b/src/lib.rs index 642f78b..062df18 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,3 @@ -#![deny(missing_debug_implementations)] /*! This crate provides a cross platform abstraction for writing colored text to a terminal. Colors are written using either ANSI escape sequences or by @@ -11...
1
5
6
22e0e99539fe77b67a164fac1479f122d6df8971
Jan Verbeek
2022-02-14T14:01:16
impl: add explicit Ansi::write_all definition This gives a large speedup when doing small writes into an `Ansi<BufWriter<...>>`. Closes #56
diff --git a/src/lib.rs b/src/lib.rs index a4ecd2b..642f78b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1340,6 +1340,17 @@ impl<W: io::Write> io::Write for Ansi<W> { self.0.write(buf) } + // Adding this method here is not required because it has a default impl, + // but it seems to provide a perf...
1
11
0
5210933dc163009642898efb0a1ef42d1d367750
Alex Touchet
2022-09-27T17:25:15
cargo: remove outdated exclusions Closes #64
diff --git a/Cargo.toml b/Cargo.toml index 05dbb43..63966cb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,6 @@ repository = "https://github.com/BurntSushi/termcolor" readme = "README.md" keywords = ["windows", "win", "color", "ansi", "console"] license = "Unlicense OR MIT" -exclude = ["/.travis.yml", "/appve...
1
0
1
c13ddd484b975b0dbd8a0e35506d63eb7e14b6e6
Trevor Gross
2022-12-20T21:38:35
api: add strikethrough support to ColorSpec Closes #46, Closes #67
diff --git a/src/lib.rs b/src/lib.rs index 64f3314..a4ecd2b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1369,6 +1369,9 @@ impl<W: io::Write> WriteColor for Ansi<W> { if spec.underline { self.write_str("\x1B[4m")?; } + if spec.strikethrough { + self.write_str("\x1B[9m")?...
1
35
10
5b524b65a5d249b0d58868f6b2471ff738c73efc
Joshua Nelson
2021-06-06T00:04:47
api: impl {Default, FromStr} for ColorChoice This allows x.py in rust-lang/rust to remove a wrapper type around ColorChoice. The defaults here seem reasonable; I chose kebab-case for parsing `AlwaysAnsi` but I'm happy to switch it. This also updates the top-level atty example in the crate docs to use the new color ch...
diff --git a/src/lib.rs b/src/lib.rs index 13a0779..64f3314 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -99,18 +99,10 @@ use atty; use termcolor::{ColorChoice, StandardStream}; let preference = argv.get_flag("color").unwrap_or("auto"); -let choice = match preference { - "always" => ColorChoice::Always, - "ans...
1
53
12
00f084dd513127fb4ac4e38cd444b398c141d7f0
Casey Rodarmor
2023-01-15T13:04:51
api: impl Debug for all public types Also add `#![deny(missing_debug_implementations)]` to ensure future additions must also implement `Debug`. PR #48
diff --git a/src/lib.rs b/src/lib.rs index c93cf7b..13a0779 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,4 @@ +#![deny(missing_debug_implementations)] /*! This crate provides a cross platform abstraction for writing colored text to a terminal. Colors are written using either ANSI escape sequences or by @@ -30...
1
14
0
dc7e7b93830579716fc180925a17551dee5cfddc
Klas Segeljakt
2021-06-09T13:04:18
api: impl WriteColor for std::io::Sink PR #38
diff --git a/src/lib.rs b/src/lib.rs index a805bb8..c93cf7b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1450,6 +1450,20 @@ impl<W: io::Write> Ansi<W> { } } +impl WriteColor for io::Sink { + fn supports_color(&self) -> bool { + false + } + + fn set_color(&mut self, _: &ColorSpec) -> io::Result<(...
1
14
0
20822cb45cb077c9c669640a5e84dc7e701fbd8c
Taiki Endo
2020-11-19T13:21:39
tests: remove use of doc_comment crate Regrettably, the use of doctest fails on Rust 1.38 and Rust 1.39, but not on any other Rust version. It works on older versions because older versions didn't recognize the 'doctest' cfg item. But newer versions did and flagged it as a nightly-only feature. Fixes #35
diff --git a/Cargo.toml b/Cargo.toml index 606412f..c4f84b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,4 +22,6 @@ bench = false winapi-util = "0.1.3" [dev-dependencies] -doc-comment = "0.3" +# TODO: Re-enable this once the MSRV is 1.43 or greater. +# See: https://github.com/BurntSushi/termcolor/issues/35 +# do...
2
7
5
a600a655de03cf41c83e95224bb2224b5025f2c0
Lukas Kalbertodt
2020-11-18T19:08:06
api: add support for dim text (ANSI only) PR #34
diff --git a/src/lib.rs b/src/lib.rs index 0e50216..380f25f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1306,6 +1306,9 @@ impl<W: io::Write> WriteColor for Ansi<W> { if spec.bold { self.write_str("\x1B[1m")?; } + if spec.dimmed { + self.write_str("\x1B[2m")?; + }...
1
33
8
7451f801bc8f654a54b194a0ea5df81a37bc57e6
Guillaume Gomez
2020-05-07T12:07:16
tests: replace "cfg(test)" with "cfg(doctest)" for readme testing PR #31
diff --git a/src/lib.rs b/src/lib.rs index 42eccda..0e50216 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -119,9 +119,9 @@ Currently, `termcolor` does not provide anything to do this for you. #![deny(missing_docs)] -#[cfg(test)] +#[cfg(doctest)] use doc_comment::doctest; -#[cfg(test)] +#[cfg(doctest)] doctest!(".....
1
2
2
1d8fcbb056ee5e4b039400efc813af55901c4c5f
Andrew Gallant
2020-01-11T15:07:46
wincolor-1.0.3
diff --git a/wincolor/Cargo.toml b/wincolor/Cargo.toml index 748205e..33fd732 100644 --- a/wincolor/Cargo.toml +++ b/wincolor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wincolor" -version = "1.0.2" #:version +version = "1.0.3" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = "DEPRECATED....
1
1
1
a04c446468a4f54bdbf32d116c150a05d733a31b
Andrew Gallant
2020-01-11T14:52:21
doc: add notes about tty detection Closes #7
diff --git a/src/lib.rs b/src/lib.rs index 1c2c9a6..42eccda 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -75,6 +75,46 @@ writeln!(&mut buffer, "green text!")?; bufwtr.print(&buffer)?; # Ok(()) } ``` + +# Detecting presence of a terminal + +In many scenarios when using color, one often wants to enable colors +automati...
1
40
0
8b56dc99b5db7c085d959c4139c6ea6b7eaa7778
Andrew Gallant
2020-01-11T14:37:29
doc: clarify how ANSI colors work Closes #6
diff --git a/src/lib.rs b/src/lib.rs index c386b91..1c2c9a6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -47,6 +47,14 @@ writeln!(&mut stdout, "green text!")?; # Ok(()) } ``` +Note that any text written to the terminal now will be colored +green when using ANSI escape sequences, even if it is written via +stderr, an...
1
8
0
423e28eb69a77799179474575869c5b0433d6adb
Andrew Gallant
2020-01-11T14:31:41
env: respect NO_COLOR environment variable This adds support for respecting the NO_COLOR environment variable, whose spec is defined here: https://no-color.org/ The relevant portion is: > All command-line software which outputs text with ANSI color > added should check for the presence of a NO_COLOR environm...
diff --git a/src/lib.rs b/src/lib.rs index ddd0a06..c386b91 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -164,8 +164,8 @@ pub enum ColorChoice { /// than emitting ANSI color codes. AlwaysAnsi, /// Try to use colors, but don't force the issue. If the console isn't - /// available on Windows, or if TERM=...
1
37
17
975fcd18ccb3ac1c4510428e3a15657811cf1216
Andrew Gallant
2020-01-11T14:17:32
edition: switch to Rust 2018
diff --git a/Cargo.toml b/Cargo.toml index 968004f..f6ad9ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,7 @@ readme = "README.md" keywords = ["windows", "win", "color", "ansi", "console"] license = "Unlicense OR MIT" exclude = ["/.travis.yml", "/appveyor.yml", "/ci/**"] +edition = "2018" [lib] name = "...
2
6
9
88a2e9cdd69ad3dc51ab5973a24acb0fa634a0fa
Nick Murphy
2019-06-25T17:16:53
api: add option to toggle terminal resetting The default remains unchanged: whenever `set_color` is called, the underlying terminal is reset when using ANSI escape sequences. The new `reset` option permits callers to disable this, and thus managing resetting themselves. Fixes #17, Closes #18
diff --git a/src/lib.rs b/src/lib.rs index ff636c2..793b5a1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1162,7 +1162,9 @@ impl<W: io::Write> WriteColor for Ansi<W> { #[inline] fn set_color(&mut self, spec: &ColorSpec) -> io::Result<()> { - self.reset()?; + if spec.reset { + self.re...
1
63
3
c26ccd1ff1b83d6a52ddf720c39ceda82f91edc8
Nathan Moreau
2019-08-17T21:08:22
bug: fix clear() and is_none() It looks like `intense` wasn't previously being considered in `clear` and `is_none`. This commit fixes that and adds some regression tests.
diff --git a/src/lib.rs b/src/lib.rs index ee7f816..f5f15e4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1512,6 +1512,7 @@ impl ColorSpec { pub fn is_none(&self) -> bool { self.fg_color.is_none() && self.bg_color.is_none() && !self.bold && !self.underline + && !self.italic && !self...
1
47
0
1644cc0b4550db8553d59ac27c903e723a042e0e
Nathan Moreau
2019-08-17T20:35:42
output: italicized support Ref #15, Closes #20
diff --git a/src/lib.rs b/src/lib.rs index f220b59..ee7f816 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1160,6 +1160,9 @@ impl<W: io::Write> WriteColor for Ansi<W> { if spec.bold { self.write_str("\x1B[1m")?; } + if spec.italic { + self.write_str("\x1B[3m")?; + }...
1
17
0
224c903a46a7204dea5beaa1120491a286255e29
Andrew Gallant
2019-08-16T13:37:05
wincolor-1.0.2
diff --git a/wincolor/Cargo.toml b/wincolor/Cargo.toml index c5e46df..b4e2c7f 100644 --- a/wincolor/Cargo.toml +++ b/wincolor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wincolor" -version = "1.0.1" #:version +version = "1.0.2" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = """ A simpl...
1
1
1
34e843fb292e74977d54fb821e9d55538b9d3516
Feiko Nanninga
2019-08-16T13:34:56
wincolor: specify dual-license The usage of `/` is deprecated: https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata Switch to `OR` to be SPDX compliant. PR #19
diff --git a/wincolor/Cargo.toml b/wincolor/Cargo.toml index c9449af..c5e46df 100644 --- a/wincolor/Cargo.toml +++ b/wincolor/Cargo.toml @@ -10,7 +10,7 @@ homepage = "https://github.com/BurntSushi/termcolor/tree/master/wincolor" repository = "https://github.com/BurntSushi/termcolor/tree/master/wincolor" readme = "REA...
1
1
1
3beef8b582c58ba84a9e0bfda059c33b90dcb0dd
kennytm
2019-06-04T14:07:14
windows: support the first 16 Ansi256 While the native Windows console APIs have very limited support for colors, we can at least support the first 16 colors of the ANSI spectrum by translating them to the standard Windows 8-bit palette, along with toggling the intensity to make 16 total colors. This fixes a bug...
diff --git a/src/lib.rs b/src/lib.rs index 1e9cef0..f220b59 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1511,17 +1511,12 @@ impl ColorSpec { &self, console: &mut wincolor::Console, ) -> io::Result<()> { - use wincolor::Intense; - - let intense = if self.intense { Intense::Yes } els...
1
40
22
cb8f789e58a345011d300ba39f8570b15911e5f0
Lucien Greathouse
2018-09-14T01:25:16
termcolor: mark Color as Copy PR #9
diff --git a/src/lib.rs b/src/lib.rs index cdfd3be..1e9cef0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1550,7 +1550,7 @@ impl ColorSpec { /// /// Hexadecimal numbers are written with a `0x` prefix. #[allow(missing_docs)] -#[derive(Clone, Debug, Eq, PartialEq)] +#[derive(Clone, Copy, Debug, Eq, PartialEq)] pub enu...
1
1
1
2c3be7d6c320ec6cdbd57805e3173377d9de6052
Andrew Gallant
2018-08-31T02:54:16
termcolor: permit cross crate inlining This increases the aggressiveness of inlining nearly trivial functions throughout termcolor. This has a roughly ~15% performance benefit in ripgrep in cases where matches are very frequent (e.g., `rg .`).
diff --git a/src/lib.rs b/src/lib.rs index 7d90491..cdfd3be 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -267,6 +267,7 @@ impl IoStandardStream { } impl io::Write for IoStandardStream { + #[inline(always)] fn write(&mut self, b: &[u8]) -> io::Result<usize> { match *self { IoStandardStre...
1
63
0
5f6fd8cc3505d7c0ebe362e5d7ba8508f76e390d
Andrew Gallant
2018-08-25T04:17:25
wincolor-1.0.1
diff --git a/wincolor/Cargo.toml b/wincolor/Cargo.toml index 63f9a52..c9449af 100644 --- a/wincolor/Cargo.toml +++ b/wincolor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wincolor" -version = "1.0.0" #:version +version = "1.0.1" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = """ A simpl...
1
1
1
a6935c022fa82b49f931583b09bcae3a014e0fb1
Andrew Gallant
2018-08-25T03:56:47
windows: replace uses of winapi with winapi-util
diff --git a/wincolor/Cargo.toml b/wincolor/Cargo.toml index 2207efe..63f9a52 100644 --- a/wincolor/Cargo.toml +++ b/wincolor/Cargo.toml @@ -16,6 +16,9 @@ license = "Unlicense/MIT" name = "wincolor" bench = false +[dependencies] +winapi-util = "0.1.1" + [dependencies.winapi] version = "0.3" -features = ["consolea...
3
38
38
f24a244ea96d2a8a89750525f6f97b9018984e89
Andrew Gallant
2018-07-21T17:16:53
crates.io: use OR instead of /
diff --git a/Cargo.toml b/Cargo.toml index c00e535..c26c8f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ homepage = "https://github.com/BurntSushi/termcolor" repository = "https://github.com/BurntSushi/termcolor" readme = "README.md" keywords = ["windows", "win", "color", "ansi", "console"] -license = ...
1
1
1
a8cd9dca3eabc9780de40101cac9f782593ed037
Igor Gnatenko
2018-07-19T08:24:01
exclude CI files from distribution
diff --git a/Cargo.toml b/Cargo.toml index 06fd9ab..c00e535 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ repository = "https://github.com/BurntSushi/termcolor" readme = "README.md" keywords = ["windows", "win", "color", "ansi", "console"] license = "Unlicense/MIT" +exclude = ["/.travis.yml", "/appveyor...
1
1
0
6cd809f4aefbbec14c8af9fb2392575b56cff0fe
Andrew Gallant
2018-07-17T22:35:57
termcolor: 1.0.0
diff --git a/Cargo.toml b/Cargo.toml index 7339ca4..06fd9ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "termcolor" -version = "0.3.6" #:version +version = "1.0.0" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = """ A simple cross platform library for writin...
1
1
1
5b2429af946d7c8a66fc03be98a31c282472efba
Andrew Gallant
2018-07-17T22:34:10
wincolor: 1.0.0
diff --git a/Cargo.toml b/Cargo.toml index 2350f55..7339ca4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,4 +17,4 @@ name = "termcolor" bench = false [target.'cfg(windows)'.dependencies] -wincolor = { version = "0.1.6", path = "wincolor" } +wincolor = { version = "1", path = "wincolor" } diff --git a/wincolor/Car...
2
2
2
b64475aeac00c430b58ff953a27d0d448161625e
Andrew Gallant
2018-07-16T21:40:02
ignore: permit use of env::home_dir Upstream deprecated env::home_dir because of minor bugs in some corner cases. We should probably eventually migrate to a correct implementation in the `dirs` crate, but using the buggy version is just fine for now.
diff --git a/ignore/src/gitignore.rs b/ignore/src/gitignore.rs index b6874d9..bcfe8b5 100644 --- a/ignore/src/gitignore.rs +++ b/ignore/src/gitignore.rs @@ -538,6 +538,10 @@ fn gitconfig_contents() -> Option<Vec<u8>> { /// /// Specifically, this respects XDG_CONFIG_HOME. fn excludes_file_default() -> Option<PathBuf>...
1
4
0
ac90316e359d41520f4f0c445286f3abda59db80
dana
2018-06-25T21:02:02
ripgrep: add --fixed-strings flag Fixes #964 PR #965
diff --git a/src/app.rs b/src/app.rs index 2cb2c46..94c3b59 100644 --- a/src/app.rs +++ b/src/app.rs @@ -909,9 +909,17 @@ fn flag_fixed_strings(args: &mut Vec<RGArg>) { Treat the pattern as a literal string instead of a regular expression. When this flag is used, special regular expression meta characters such as .()...
1
9
1
a6467f880aee7bfaeb57f81feba2b57f8f117854
Andrew Gallant
2018-06-24T00:19:34
ripgrep: disable autotests This keeps us working in Rust 2018. Fixes #923
diff --git a/Cargo.toml b/Cargo.toml index acce68b..f0d5439 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,6 +16,7 @@ categories = ["command-line-utilities", "text-processing"] license = "Unlicense/MIT" exclude = ["HomebrewFormula"] build = "build.rs" +autotests = false [badges] travis-ci = { repository = "Burn...
1
1
0
004bb35694a564e3f677003dddc97e455bcd7922
Andrew Gallant
2018-06-24T00:18:56
ripgrep/printer: fix small performance regression This commit removes an unconditional extra regex search that is in fact not always necessary. This can result in a 2x performance improvement in cases where ripgrep reports many matches. The fix itself isn't ideal, but we continue to punt on cleaning up the printer un...
diff --git a/src/printer.rs b/src/printer.rs index 721967e..20fd1c4 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -272,10 +272,14 @@ impl<W: WriteColor> Printer<W> { byte_offset: Option<u64> ) { if !self.line_per_match && !self.only_matching { - let mat = re - .fin...
1
14
4
cd6c1909674648f13d9de16aa7413ea7ed240e49
Andrew Gallant
2018-06-24T00:17:29
ripgrep: use new BufferedStandardStream from termcolor Specifically, this will use a buffered writer when not printing to a tty. This fixes a long standing performance regression where ripgrep would slow down dramatically if it needed to report a lot of matches. Fixes #955
diff --git a/src/args.rs b/src/args.rs index 0c231d0..e410cd7 100644 --- a/src/args.rs +++ b/src/args.rs @@ -228,8 +228,13 @@ impl Args { } /// Create a new writer for single-threaded searching with color support. - pub fn stdout(&self) -> termcolor::StandardStream { - termcolor::StandardStream::s...
2
11
10
d5139228e5787b9ec0ea8209e64d3b878ab72309
Andrew Gallant
2018-06-24T00:16:00
termcolor: add BufferedStandardStream This commit adds a new type, BufferedStandardStream, which emulates the StandardStream API (sans `lock`), but will internally use a buffered writer. To achieve this, we add a new default method to the WriteColor trait that indicates whether the underlying writer must synchronousl...
diff --git a/termcolor/src/lib.rs b/termcolor/src/lib.rs index 4e4b086..7d90491 100644 --- a/termcolor/src/lib.rs +++ b/termcolor/src/lib.rs @@ -102,6 +102,21 @@ pub trait WriteColor: io::Write { /// If there was a problem resetting the color settings, then an error is /// returned. fn reset(&mut self) -...
1
199
64
bb16ba6311c13369e85b7246380acc9960b52833
Stepan Koltsov
2018-06-23T19:25:43
ignore/types: add Bazel `BUILD`, `WORKSPACE` are mentioned here: https://docs.bazel.build/versions/master/build-ref.html `*.bzl` is mentioned here: https://docs.bazel.build/versions/master/skylark/concepts.html PR #960
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index 6fa2c5c..3f96f8e 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -104,6 +104,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("asm", &["*.asm", "*.s", "*.S"]), ("avro", &["*.avdl", "*.avpr", "*.avsc"])...
1
1
0
ca23a170f769f59e5bde02a4ab32b54cd2d66165
Jon Surrell
2018-06-19T11:41:44
ripgrep: use exit code 2 to indicate error Exit code 1 was shared to indicate both "no results" and "error." Use status code 2 to indicate errors, similar to grep's behavior. Fixes #948 PR #954
diff --git a/src/main.rs b/src/main.rs index 761348f..e374338 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,7 +60,7 @@ fn main() { Ok(_) => process::exit(0), Err(err) => { eprintln!("{}", err); - process::exit(1); + process::exit(2); } } } diff --g...
3
59
10
223d7d9846bff4a9aaf6ba84f5662a1ee7ffa900
Mårten Kongstad
2018-06-15T10:38:23
ignore/types: add Android makefile types The Android platform is gradually moving from Makefiles (*.mk) to Blueprint files (*.bp). Add support for both. See [1] for more information. 1. https://android.googlesource.com/platform/build/blueprint/+/master-soong
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index d01d4f7..6fa2c5c 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -99,6 +99,7 @@ use {Error, Match}; const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("agda", &["*.agda", "*.lagda"]), ("aidl", &["*.aidl"]), ...
1
1
0
e4bce86111fe399c5e3cc54e70683f6f726283d8
Mårten Kongstad
2018-06-15T10:29:34
ignore/types: add AIDL file type Add support for Android Interface Definition Language files (*.aidl). See [1] for more information. 1. https://developer.android.com/guide/components/aidl
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index 288da19..d01d4f7 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -98,6 +98,7 @@ use {Error, Match}; const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("agda", &["*.agda", "*.lagda"]), + ("aidl", &["*.aidl"])...
1
1
0
15fa77cdb384e013165687f361073defa02d9d98
Tim Kilbourn
2018-06-06T11:42:08
ignore/types: add FIDL type FIDL is the Fuchsia Interface Definition Language https://fuchsia.googlesource.com/zircon/+/HEAD/docs/fidl/index.md
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index ed60e01..288da19 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -131,6 +131,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("elixir", &["*.ex", "*.eex", "*.exs"]), ("elm", &["*.elm"]), ("erlang"...
1
1
0
7f3a0f0828a6233cfb99a84b6a39e5184144ec41
Stephen E. Baker
2018-05-08T16:03:19
ignore/types: add jsp extension to java type
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index 94016c8..ed60e01 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -146,7 +146,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("haskell", &["*.hs", "*.lhs"]), ("hs", &["*.hs", "*.lhs"]), ("html", &...
1
1
1
49f36c7dcdc0f26ecbd956b4ed0ffe7a256b64f5
Bastien Orivel
2018-05-07T17:07:30
deps: update regex to 1.0 We retain the `simd-accel` feature on globset for backwards compatibility, but will remove it in the next semver release.
diff --git a/Cargo.lock b/Cargo.lock index 13659c4..7ba6d17 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,7 +16,7 @@ dependencies = [ [[package]] name = "atty" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.40 (registry+https:...
5
32
32
83b4fdb8d664afe7773ce674b5f1b658c2c5a057
Garrett Squire
2018-05-06T23:03:11
ignore/doc: improve docs for case_insensitive This commit updates the OverrideBuilder and GitignoreBuilder docs for the case_insensitive method, denoting that it must be called before adding any patterns.
diff --git a/ignore/src/gitignore.rs b/ignore/src/gitignore.rs index abcb368..b6874d9 100644 --- a/ignore/src/gitignore.rs +++ b/ignore/src/gitignore.rs @@ -500,6 +500,8 @@ impl GitignoreBuilder { /// Toggle whether the globs should be matched case insensitively or not. /// + /// When this option is chan...
2
4
0
a2d8c49d6f8e4c7810642976174dde8642d1d8e8
Bram Geron
2018-05-03T13:05:00
ignore/types: add shorthand 'hs' for Haskell
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index b662423..94016c8 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -144,6 +144,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("h", &["*.h", "*.hpp"]), ("hbs", &["*.hbs"]), ("haskell", &["*.hs", "*...
1
1
0
198d1fede962814efbb2cc4883659c29492a2048
Andrew Gallant
2018-04-29T13:30:22
ignore/types: fix typo in puppet glob Thanks @CYBAI for noticing this! See #899
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index 9737d67..b662423 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -215,7 +215,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("pod", &["*.pod"]), ("protobuf", &["*.proto"]), ("ps", &["*.cdxml", "*...
1
1
1
667b9a7d624fc5fcfb183d463d4a73964d27f51e
Zach Crownover
2018-04-29T13:21:48
ignore/types: add puppet Puppet is primarily written in it's own format of .pp files, but custom facts and functions are often written in Ruby. The templating language is ERB and so this will allow scanning of any of the three most commonly used formats for Puppet specific things.
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index ffec23d..9737d67 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -215,6 +215,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("pod", &["*.pod"]), ("protobuf", &["*.proto"]), ("ps", &["*.cdxml", "*...
1
1
0
1f528f1641c63a79c324dd67b3dda5e9df9986a7
Andrew Gallant
2018-04-26T21:04:35
doc: update crates.io description This brings it in line with the README.
diff --git a/Cargo.toml b/Cargo.toml index 5dc7f01..358d8ea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,8 +3,9 @@ name = "ripgrep" version = "0.8.1" #:version authors = ["Andrew Gallant <jamslam@gmail.com>"] description = """ -Line oriented search tool using Rust's regex library. Combines the raw -performance of...
1
3
2
1266de3d4c82f281642ba0f4b59827091a55c8fc
Jonathan Klimt
2018-04-24T13:00:03
ignore/types: add verilog
diff --git a/ignore/src/types.rs b/ignore/src/types.rs index d021df3..ffec23d 100644 --- a/ignore/src/types.rs +++ b/ignore/src/types.rs @@ -275,6 +275,7 @@ const DEFAULT_TYPES: &'static [(&'static str, &'static [&'static str])] = &[ ("twig", &["*.twig"]), ("vala", &["*.vala"]), ("vb", &["*.vb"]), + (...
1
1
0
bf51058eb27458c4f01d4cbf8bf4ee0d80fac61e
Andrew Gallant
2018-04-24T00:37:59
tests: fix tests on Windows A bug in the atty crate was previously masking a problem with the integration tests on Windows. Namely, the bug in atty resulted in atty::is(Stdin) returning true if we couldn't get the file name for the stdin stream. This in turn caused tests like `rg foo` to search the CWD, which was the ...
diff --git a/tests/tests.rs b/tests/tests.rs index b1b972c..0ee4995 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -1866,6 +1866,7 @@ fn feature_411_parallel_search_stats() { let mut cmd = wd.command(); cmd.arg("--stats"); cmd.arg("Sherlock"); + cmd.arg("./"); let lines: String = wd.stdout...
1
3
2
3dc6fe6f057028398f19cfdcc2f3d059fda1838b
Andrew Gallant
2018-04-24T00:06:03
output: remove unnecessary mut binding
diff --git a/src/printer.rs b/src/printer.rs index fce6858..721967e 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -472,7 +472,7 @@ impl<W: WriteColor> Printer<W> { } fn line_number(&mut self, n: u64, sep: u8) { - let mut line_number = n.to_string(); + let line_number = n.to_string(); ...
1
1
1
ed059559cd465c32ee7b05b9ae46612c105a2bea
Andrew Gallant
2018-04-23T23:32:39
deps: update to atty 0.2.9 https://github.com/softprops/atty/pull/25 was merged, so we can upgrade.
diff --git a/Cargo.lock b/Cargo.lock index a3535be..13659c4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -16,7 +16,7 @@ dependencies = [ [[package]] name = "atty" -version = "0.2.6" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "libc 0.2.40 (registry+https:/...
2
5
5
b75526bd7f92529c8e49c9795d3c0e6bc4143721
Andrew Gallant
2018-04-23T23:25:55
output: add --no-column flag This disables columns in the output if they were otherwise enabled. Fixes #880
diff --git a/src/app.rs b/src/app.rs index a0b4eaf..2c3bfe4 100644 --- a/src/app.rs +++ b/src/app.rs @@ -741,9 +741,17 @@ fn flag_column(args: &mut Vec<RGArg>) { Show column numbers (1-based). This only shows the column numbers for the first match on each line. This does not try to account for Unicode. One byte is eq...
3
40
1
507801c1f2efdc45ea25227a613c2e38cdecf88b
Andrew Gallant
2018-04-23T22:33:25
ignore: support .git directory OR file This improves support for submodules, which seem to use a '.git' file instead of a '.git' directory to indicate a worktree. Fixes #893
diff --git a/ignore/src/dir.rs b/ignore/src/dir.rs index 77ee6ad..13065c3 100644 --- a/ignore/src/dir.rs +++ b/ignore/src/dir.rs @@ -254,7 +254,7 @@ impl Ignore { git_global_matcher: self.0.git_global_matcher.clone(), git_ignore_matcher: gi_matcher, git_exclude_matcher: gi_exclude...
2
35
2
0ee0b160b583715b2c4629978695f3567cb6fc09
Andrew Gallant
2018-04-23T22:18:44
logging: add new --no-ignore-messages flag The new --no-ignore-messages flag permits suppressing errors related to parsing .gitignore or .ignore files. These error messages can be somewhat annoying since they can surface from repositories that one has no control over. Fixes #646
diff --git a/src/app.rs b/src/app.rs index 5d4faac..a0b4eaf 100644 --- a/src/app.rs +++ b/src/app.rs @@ -544,6 +544,7 @@ pub fn all_args_and_flags() -> Vec<RGArg> { flag_mmap(&mut args); flag_no_config(&mut args); flag_no_ignore(&mut args); + flag_no_ignore_messages(&mut args); flag_no_ignore_par...
3
36
3
b4781e2f91c0ea561fe8a8cb80cfae3aae9bfffb
Andrew Gallant
2018-04-23T22:07:57
doc: more specific docs for --no-messages This makes it clear that the --no-messages flag doesn't actually suppress all error messages, and is therefore not equivalent to redirecting stderr to /dev/null. See also: #860
diff --git a/src/app.rs b/src/app.rs index 54ae1ac..5d4faac 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1281,8 +1281,8 @@ This flag can be disabled with the --ignore-vcs flag. fn flag_no_messages(args: &mut Vec<RGArg>) { const SHORT: &str = "Suppress all error messages."; const LONG: &str = long!("\ -Suppre...
1
2
2