35+ results for 'ripgrep lang:rust' (0 ms)

Not the results you expected?

05_ripgrep.rs (https://github.com/chromium/chromium.git) Rust · 952 lines

3 //

4 // CLI used is adapted from ripgrep 48a8a3a691220f9e5b2b08f4051abe8655ea7e8a

5

242 const ABOUT: &str = "

243 ripgrep (rg) recursively searches your current directory for a regex pattern.

244

245 ripgrep's regex engine uses finite automata and guarantees linear time

246 searching. Because of this, features like backreferences and arbitrary

248

249 Project home page: https://github.com/BurntSushi/ripgrep

250

303

304 Command::new("ripgrep")

305 .author("BurntSushi") // simulating since it's only a bench

_05_ripgrep.rs (https://github.com/anp/lolbench.git) Rust · 783 lines

3 //

4 // CLI used is adapted from ripgrep 48a8a3a691220f9e5b2b08f4051abe8655ea7e8a

5

11 wrap_libtest! {

12 _05_ripgrep,

13 fn build_app_short(b: &mut Bencher) { b.iter(|| app_short()); }

16 wrap_libtest! {

17 _05_ripgrep,

18 fn build_app_long(b: &mut Bencher) { b.iter(|| app_long()); }

21 wrap_libtest! {

22 _05_ripgrep,

23 fn build_help_short(b: &mut Bencher) {

29 wrap_libtest! {

30 _05_ripgrep,

31 fn build_help_long(b: &mut Bencher) {

lib.rs (https://github.com/liuchengxu/vim-clap.git) Rust · 144 lines

79

80 /// Prepend an icon to the output line of ripgrep.

81 pub fn prepend_grep_icon(line: &str) -> String {

pipe.rs (https://github.com/phiresky/ripgrep-all.git) Rust · 196 lines

15 //!

16 //! let (mut read, mut write) = ripgrep_all::pipe::pipe();

17 //!

main.rs (https://github.com/Manishearth/oreutils.git) Rust · 187 lines

14 enum Opt {

15 #[structopt(about = "Install the basic utilities: ripgrep, exa, bat, fd")]

16 Install {

45 Tool {

46 name: "ripgrep",

47 package: "ripgrep",

misc.rs (git://github.com/fosskers/aura.git) Rust · 36 lines

10

11 /// Expected location of the `ripgrep` executable.

12 const RIPGREP: &str = "/bin/rg";

29 pub(crate) fn searcher() -> (&'static str, &'static [&'static str]) {

30 let rg = Path::new(RIPGREP);

31 if rg.exists() {

32 (RIPGREP, &["-N"])

33 } else {

rga-fzf.rs (https://github.com/phiresky/ripgrep-all.git) Rust · 64 lines

2 use rga::adapters::spawning::map_exe_error;

3 use ripgrep_all as rga;

4

rga-preproc.rs (https://github.com/phiresky/ripgrep-all.git) Rust · 38 lines

3 use rga::print_dur;

4 use ripgrep_all as rga;

5

lib.rs (https://github.com/phiresky/ripgrep-all.git) Rust · 70 lines

20 pub fn project_dirs() -> Result<ProjectDirs> {

21 directories_next::ProjectDirs::from("", "", "ripgrep-all")

22 .context("no home directory found! :(")

logger.rs (https://github.com/gnzlbg/cargo-asm.git) Rust · 71 lines

1 // This logger has been adapted from ripgrep:

2 // https://github.com/BurntSushi/ripgrep

app.rs (https://github.com/liuchengxu/vim-clap.git) Rust · 112 lines

36 #[structopt(name = "ripgrep-forerunner")]

37 RipGrepForerunner(crate::cmd::grep::RipGrepForerunner),

38 /// Retrive the latest remote release info.

95 }

96 Cmd::RipGrepForerunner(rip_grep_forerunner) => {

97 rip_grep_forerunner.run(self.number, self.icon_painter, self.no_cache)?

templates.rs (https://github.com/RustRPM/cargo-rpm.git) Rust · 137 lines

25 pub struct SpecParams {

26 /// Name of the RPM, sans ".rpm", e.g. "ripgrep"

27 pub name: String,

main.rs (https://bitbucket.org/sailfish009/rust.git) Rust · 139 lines

22 Test {

23 name: "ripgrep",

24 repo: "https://github.com/BurntSushi/ripgrep",

05-ripgrep-parse-lots.rs (https://github.com/anp/lolbench.git) Rust · 4 lines

3 init_logging ( ) ; let mut crit = criterion_from_env ( ) ; clap_2_31_2 ::

4 _05_ripgrep :: parse_lots ( & mut crit ) ; }

05-ripgrep-build-help-short.rs (https://github.com/anp/lolbench.git) Rust · 4 lines

3 init_logging ( ) ; let mut crit = criterion_from_env ( ) ; clap_2_31_2 ::

4 _05_ripgrep :: build_help_short ( & mut crit ) ; }

05-ripgrep-build-help-long.rs (https://github.com/anp/lolbench.git) Rust · 4 lines

3 init_logging ( ) ; let mut crit = criterion_from_env ( ) ; clap_2_31_2 ::

4 _05_ripgrep :: build_help_long ( & mut crit ) ; }

05-ripgrep-build-app-short.rs (https://github.com/anp/lolbench.git) Rust · 4 lines

3 init_logging ( ) ; let mut crit = criterion_from_env ( ) ; clap_2_31_2 ::

4 _05_ripgrep :: build_app_short ( & mut crit ) ; }

lib.rs (https://github.com/anp/lolbench.git) Rust · 15 lines

13 pub mod _04_new_help;

14 pub mod _05_ripgrep;

15 pub mod _06_rustup;

05-ripgrep-parse-complex.rs (https://github.com/anp/lolbench.git) Rust · 4 lines

3 init_logging ( ) ; let mut crit = criterion_from_env ( ) ; clap_2_31_2 ::

4 _05_ripgrep :: parse_complex ( & mut crit ) ; }

05-ripgrep-parse-clean.rs (https://github.com/anp/lolbench.git) Rust · 4 lines

3 init_logging ( ) ; let mut crit = criterion_from_env ( ) ; clap_2_31_2 ::

4 _05_ripgrep :: parse_clean ( & mut crit ) ; }

05-ripgrep-build-app-long.rs (https://github.com/anp/lolbench.git) Rust · 4 lines

3 init_logging ( ) ; let mut crit = criterion_from_env ( ) ; clap_2_31_2 ::

4 _05_ripgrep :: build_app_long ( & mut crit ) ; }

05-ripgrep-parse-lots.rs (https://github.com/anp/lolbench.git) Rust · 3 lines

1 extern crate lolbench ; # [ test ] fn end_to_end ( ) {

2 lolbench :: end_to_end_test ( "clap_2_31_2" , "_05_ripgrep::parse_lots" , ) ;

3 }

05-ripgrep-parse-complex.rs (https://github.com/anp/lolbench.git) Rust · 3 lines

1 extern crate lolbench ; # [ test ] fn end_to_end ( ) {

2 lolbench :: end_to_end_test ( "clap_2_31_2" , "_05_ripgrep::parse_complex" , )

3 ; }

05-ripgrep-parse-clean.rs (https://github.com/anp/lolbench.git) Rust · 3 lines

1 extern crate lolbench ; # [ test ] fn end_to_end ( ) {

2 lolbench :: end_to_end_test ( "clap_2_31_2" , "_05_ripgrep::parse_clean" , ) ;

3 }

05-ripgrep-build-help-short.rs (https://github.com/anp/lolbench.git) Rust · 3 lines

2 lolbench :: end_to_end_test (

3 "clap_2_31_2" , "_05_ripgrep::build_help_short" , ) ; }

05-ripgrep-build-help-long.rs (https://github.com/anp/lolbench.git) Rust · 3 lines

1 extern crate lolbench ; # [ test ] fn end_to_end ( ) {

2 lolbench :: end_to_end_test ( "clap_2_31_2" , "_05_ripgrep::build_help_long" ,

3 ) ; }

05-ripgrep-build-app-short.rs (https://github.com/anp/lolbench.git) Rust · 3 lines

1 extern crate lolbench ; # [ test ] fn end_to_end ( ) {

2 lolbench :: end_to_end_test ( "clap_2_31_2" , "_05_ripgrep::build_app_short" ,

3 ) ; }

05-ripgrep-build-app-long.rs (https://github.com/anp/lolbench.git) Rust · 3 lines

1 extern crate lolbench ; # [ test ] fn end_to_end ( ) {

2 lolbench :: end_to_end_test ( "clap_2_31_2" , "_05_ripgrep::build_app_long" ,

3 ) ; }

tests.rs (https://github.com/BurntSushi/ripgrep.git) Rust · 22 lines

9

10 // Tests for ripgrep's handling of binary files.

11 mod binary;

12 // Tests related to most features in ripgrep. If you're adding something new

13 // to ripgrep, tests should probably go in here.

14 mod feature;

15 // Tests for ripgrep's JSON format.

16 mod json;

18 mod misc;

19 // Tests for ripgrep's multiline search support.

20 mod multiline;

lib.rs (https://github.com/BurntSushi/ripgrep.git) Rust · 23 lines

1 /*!

2 ripgrep, as a library.

3

4 This library is intended to provide a high level facade to the crates that

5 make up ripgrep's core searching routines. However, there is no high level

6 documentation available yet guiding users on how to fit all of the pieces

config.rs (https://github.com/BurntSushi/ripgrep.git) Rust · 169 lines

1 // This module provides routines for reading ripgrep config "rc" files. The

2 // primary output of these routines is a sequence of arguments, where each

16

17 /// Return a sequence of arguments derived from ripgrep rc configuration files.

18 pub fn args() -> Vec<OsString> {

19 let config_path = match env::var_os("RIPGREP_CONFIG_PATH") {

20 None => return vec![],

47

48 /// Parse a single ripgrep rc file from the given path.

49 ///

50 /// On success, this returns a set of shell arguments, in order, that should

51 /// be pre-pended to the arguments given to ripgrep at the command line.

52 ///

65

66 /// Parse a single ripgrep rc file from the given reader.

67 ///

messages.rs (https://github.com/BurntSushi/ripgrep.git) Rust · 74 lines

16

17 /// Like message, but sets ripgrep's "errored" flag, which controls the exit

18 /// status.

65

66 /// Returns true if and only if ripgrep came across a non-fatal error.

67 pub fn errored() -> bool {

70

71 /// Indicate that ripgrep has come across a non-fatal error.

72 pub fn set_errored() {

bench.rs (https://github.com/BurntSushi/ripgrep.git) Rust · 116 lines

1 /*!

2 This module benchmarks the glob implementation. For benchmarks on the ripgrep

3 tool itself, see the benchsuite directory.

subject.rs (https://github.com/BurntSushi/ripgrep.git) Rust · 160 lines

63 // At this point, we only want to search something if it's explicitly a

64 // file. This omits symlinks. (If ripgrep was configured to follow

65 // symlinks, then they have already been followed by the directory

127 ///

128 /// However, note that ripgrep does not see through shell globbing. e.g.,

129 /// in `rg foo ./some-dir/*`, `./some-dir/some-other-file` will be treated

05_ripgrep.rs (https://github.com/kbknapp/clap-rs.git) Rust · 953 lines

3 //

4 // CLI used is adapted from ripgrep 48a8a3a691220f9e5b2b08f4051abe8655ea7e8a

5

242 const ABOUT: &str = "

243 ripgrep (rg) recursively searches your current directory for a regex pattern.

244

245 ripgrep's regex engine uses finite automata and guarantees linear time

246 searching. Because of this, features like backreferences and arbitrary

248

249 Project home page: https://github.com/BurntSushi/ripgrep

250

303

304 App::new("ripgrep")

305 .author("BurntSushi") // simulating since it's only a bench