summaryrefslogtreecommitdiffstats
path: root/build.rs
AgeCommit message (Collapse)Author
2020-03-15doc: remove CPU features from man pagesAndrew Gallant
It doesn't really belong in the man page since it's an artifact of a build/runtime configuration. Moreover, it inhibits reproducible builds. Fixes #1441
2020-02-17repo: make ripgrep build with the new organizationAndrew Gallant
2020-02-17style: rustfmt everythingAndrew Gallant
This is why I was so intent on clearing the PR queue. This will effectively invalidate all existing patches, so I wanted to start from a clean slate. We do make one little tweak: we put the default type definitions in their own file and tell rustfmt to keep its grubby mits off of it. We also sort it lexicographically and hopefully will enforce that from here on.
2019-01-19edition: fix build.rsAndrew Gallant
2018-11-06doc: escape braces in AsciiDocAndrew Gallant
This commit fixes a bug where AsciiDoc would drop any line containing a '{foo}' because it interpreted it as an undefined attribute reference: > Simple attribute references take the form {<name>}. If the attribute name > is defined its text value is substituted otherwise the line containing the > reference is dropped from the output. See: https://www.methods.co.nz/asciidoc/chunked/ch30.html We fix this by simply replacing all occurrences of '{' and '}' with their escaped forms: '&#123;' and '&#125;'. Fixes #1101
2018-08-21ripgrep: move minimum version to Rust stableAndrew Gallant
This also updates some code to make use of our more liberal versioning requirement, including the use of crossbeam-channel instead of the MsQueue from the older an unmaintained crossbeam 0.3. This does regrettably add a sizable number of dependencies, however, compile times seem mostly unaffected. Closes #1019
2018-08-20ripgrep: migrate to libripgrepAndrew Gallant
This commit does the work to delete the old `grep` crate and effectively rewrite most of ripgrep core to use the new libripgrep crates. The new `grep` crate is now a facade that collects the various crates that make up libripgrep. The most complex part of ripgrep core is now arguably the translation between command line parameters and the library options, which is ultimately where we want to be.
2018-02-20doc: omit revision when it isn't availableAndrew Gallant
If the revision is empty, then we shouldn't show the `(rev )` text in the output of `rg --version`. Fixes #789
2018-02-10ci: update deployment for doc rearrangementAndrew Gallant
This fixes CI to handle the new documentation files. We also continue to do more cleanup. In particular, we devise a nicer way of detecting the most recent Cargo OUT_DIR by writing a dummy file, and looking for the most recently modified version of that file.
2018-02-06argv: support hidden flagsAndrew Gallant
This commit adds support for hidden flags. The purpose of hidden flags is for things that end users likely won't need unless they have a configuration file that disables ripgrep's defaults. These flags will provide a way to re-enable ripgrep's defaults.
2018-02-06doc: generate man pageAndrew Gallant
This commit uses the recent refactoring for defining flags to automatically generate a man page. This finally allows us to define the documentation for each flag in a single place. The man page is generated on every build, if and only if `asciidoc` is installed. When generated, it is placed in Cargo's `OUT_DIR` directory, which is the same place that shell completions live.
2018-02-04build: add git hashAndrew Gallant
This commit makes the git hash ripgrep was built with available for use in the version string. We also do a few minor touchups in build.rs and src/app.rs.
2017-05-29Add Zsh completion fileFangrui Song
2017-04-05updates clap and removes home rolled -h/--help distinctionKevin K
This commit updates clap to v2.23.0 The update contained a bug fix in clap that results in broken code in ripgrep. ripgrep was relying on the bug, but this commit fixes that issue. The bug centered around not being able to override the auto-generated help message by supplying a flag with a long of `help`. Normally, supplying a flag with a long of `help` means whenever the user passes `--help`, the consuming code (e.g. ripgrep) is responsible for displaying the help message. However, due to the bug in clap this wasn't necessary for ripgrep to do unless the user passed `-h`. With the bug fixed, it meant the user passing `--help` and clap expected ripgrep to display the help, yet ripgrep expected clap to display the help. This has been fixed in this commit of ripgrep. All well now! v2.23.0 also brings the abilty to use `Arg::help` or `Arg::long_help` allowing one to distinguish between `-h` and `--help`. This commit leaves all doc strings in the `lazy_static!` hashmap however only for aesthetic reasons. This means all home rolled handling of `-h`/`--help` has been removed from ripgrep, yet functionality *and* appearances are 100% the same.
2017-03-08Remove clap validator + add max-filesize integration testsMarc Tiehuis
2017-03-08Add `--max-filesize` option to clitiehuis
The --max-filesize option allows filtering files which are larger than the specified limit. This is potentially useful if one is attempting to search a number of large files without common file-types/suffixes. See #369.
2016-12-07Fix completion build.rsAndrew Gallant
2016-11-17Switch from Docopt to Clap.Andrew Gallant
There were two important reasons for the switch: 1. Performance. Docopt does poorly when the argv becomes large, which is a reasonable common use case for search tools. (e.g., use with xargs) 2. Better failure modes. Clap knows a lot more about how a particular argv might be invalid, and can therefore provide much clearer error messages. While both were important, (1) made it urgent. Note that since Clap requires at least Rust 1.11, this will in turn increase the minimum Rust version supported by ripgrep from Rust 1.9 to Rust 1.11. It is therefore a breaking change, so the soonest release of ripgrep with Clap will have to be 0.3. There is also at least one subtle breaking change in real usage. Previous to this commit, this used to work: rg -e -foo Where this would cause ripgrep to search for the string `-foo`. Clap currently has problems supporting this use case (see: https://github.com/kbknapp/clap-rs/issues/742), but it can be worked around by using this instead: rg -e [-]foo or even rg [-]foo and this still works: rg -- -foo This commit also adds Bash, Fish and PowerShell completion files to the release, fixes a bug that prevented ripgrep from working on file paths containing invalid UTF-8 and shows short descriptions in the output of `-h` but longer descriptions in the output of `--help`. Fixes #136, Fixes #189, Fixes #210, Fixes #230