Skip to content

Commit

Permalink
Nimgrep improvements 2 (nim-lang#15612)
Browse files Browse the repository at this point in the history
* nimgrep: speed up by threads and Channels
* nimgrep: add --bin, --text, --count options
* nimgrep: add --sortTime option
* allow Peg in all matches
including --includeFile, --excludeFile, --excludeDir

* add --match and --noMatch options
* add --includeDir option
* add --limit (-m) and --onlyAscii (-o) options
* fix performance regression

introduced in nimgrep improvements nim-lang#12779

* better error handling
* add option --fit
* fix groups in --replace
* fix flushing, --replace, improve --count
* use "." as the default directory, not full path
* fix --fit for Windows
* force target to C for macosx
* validate non-negative int input for options nim-lang#15318
* switch nimgrep to using --gc:orc
* address review: implement cropping in matches,...
* implement stdin/pipe & revise --help
* address stylistic review & add limitations
  • Loading branch information
a-mr authored and PMunch committed Jan 6, 2021
1 parent f08173b commit 02d0af2
Show file tree
Hide file tree
Showing 3 changed files with 1,049 additions and 297 deletions.
3 changes: 3 additions & 0 deletions testament/categories.nim
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ proc debuggerTests(r: var TResults, cat: Category, options: string) =
if fileExists("tools/nimgrep.nim"):
var t = makeTest("tools/nimgrep", options & " --debugger:on", cat)
t.spec.action = actionCompile
# force target to C because of MacOS 10.15 SDK headers bug
# https://github.com/nim-lang/Nim/pull/15612#issuecomment-712471879
t.spec.targets = { targetC }
testSpec r, t

# ------------------------- JS tests ------------------------------------------
Expand Down
Loading

0 comments on commit 02d0af2

Please sign in to comment.