Commit Graph

45 Commits

Author SHA1 Message Date
Andrey Makarov
edd84bd9bc nimgrep: change 2 iterators to closure 2020-11-14 01:21:27 +03:00
Andrey Makarov
5db181f377 Nimgrep improvements 2 (#15612)
* 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 #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 #15318
* switch nimgrep to using --gc:orc
* address review: implement cropping in matches,...
* implement stdin/pipe & revise --help
* address stylistic review & add limitations
2020-11-09 09:19:06 +01:00
Timothee Cour
695154970d deprecate existsDir; use dirExists instead (#14884) 2020-07-03 23:04:23 +02:00
Timothee Cour
dc5a40f3f3 {.deprecated: [existsFile: fileExists].} (#14735)
* {.deprecated: [existsFile: fileExists].}

* s/existsFile/fileExists/ except under deps

* workaround pending #14819

* fix test
2020-07-02 16:19:13 +02:00
genotrance
35b046373a Improve #12920 fix (#13958) 2020-04-12 21:08:16 +02:00
Timothee Cour
27241fda23 fix #13528 nimgrep --word now works better with operators (#13537) 2020-03-02 17:55:17 +01:00
genotrance
f9f55a23bb Fix single match output (#12920) 2019-12-17 20:26:11 +01:00
Andrey Makarov
26074f594d nimgrep improvements (#12779)
* fix sticky colors in styledWrite

* nimgrep: context printing, colorthemes and other

* add context printing (lines after and before a match)
* nimgrep: add exclude/include options
* nimgrep: improve error printing & symlink handling
* nimgrep: rename dangerous `-r` argument
* add a `--newLine` style option for starting matching/context
  lines from a new line
* add color themes: 3 new themes besides default `simple`
* enable printing of multi-line matches with line numbers
* proper display of replace when there was another match replaced at
  the same line / context block
* improve cmdline arguments error reporting
2019-12-05 14:42:20 +01:00
Andrey Makarov
5a65243e14 fix nimgrep color on posix #7591 (#12288) 2019-09-28 00:19:57 +02:00
Andreas Rumpf
b9c15371a3 nimgrep: introduce the --rex option 2019-07-27 14:01:28 +02:00
Andreas Rumpf
f7c99838e2 nimgrep: fixes the -w option 2019-07-27 14:01:28 +02:00
Araq
38bdf1cd7f minor style changes 2019-07-10 23:55:56 +02:00
Araq
96b2233b71 nimgrep: be less annoying 2019-05-24 10:29:26 +02:00
Araq
845f89ab54 better default for nimgrep 2019-05-22 07:41:16 +02:00
Araq
80c69ffd31 nimgrep: use standard regular expression syntax, not reExtended 2019-01-13 16:23:08 +01:00
Araq
bd5dd2b95b nimgrep: fixes #989 2019-01-13 16:22:19 +01:00
Araq
dbd21d670c make more things compile without isNil 2018-08-22 15:12:02 +02:00
Andreas Rumpf
e50f69bc87 nimgrep: count the number of matches 2018-04-27 09:57:20 +02:00
Andreas Rumpf
64908bf171 nimgrep: add --filenames option 2018-04-24 09:34:29 +02:00
Timothee Cour
44ee3c27c0 [nimgrep] add option --oneline to keep file:line info when piping (#7592)
through grep
2018-04-13 07:42:42 +02:00
Mathias Stearn
23c77ffa3a Faster nimgrep (#6983)
* compile nimgrep with -d:release
* nimgrep: only parse pattern once at startup
2018-01-03 12:42:39 +01:00
Andreas Rumpf
084ed53baa make nimgrep compile without warnings 2016-09-26 19:26:39 +02:00
Andreas Rumpf
568de6013f fixes #4751 2016-09-12 23:04:19 +02:00
Araq
68cbb4d2b4 nimgrep version 1 2015-12-05 18:33:18 +01:00
patrick dw
f71eaf66be renamed writeln to writeLine in tools 2015-06-19 01:36:57 -05:00
Hans Raaf
58186f6c1d Replaced deprecated repeatChar() with repeat() or spaces(). 2015-03-04 03:30:43 +01:00
Federico Ceratto
657dca5c3b Fix typos 2015-02-15 16:20:32 +00:00
Araq
63c9c2877e updated nimgrep tool 2014-09-10 22:27:07 +02:00
Araq
ae53d1ecc8 nimgrep compiles again 2014-09-07 02:52:15 +02:00
Araq
a68f17a9f7 posix.nim compiles again 2014-08-29 01:28:48 +02:00
Clay Sweetser
ce5a494927 Changed tests and tools to use 'discard' statements instead of 'nil' for empty blocks. 2014-02-15 18:57:03 -05:00
Araq
bf205fa85d case consistency part 6 2013-12-28 01:17:02 +01:00
Dominik Picheta
9540a93d95 Fixed terminal module so that it doesn't raise an EOS exception when stdout is redirected. 2013-06-22 19:57:12 +01:00
Grzegorz Adam Hankiewicz
72a3e21f28 Removes executable bit for text files. 2013-03-16 23:53:07 +01:00
Araq
ba3f90cc25 added terminal.isatty; nimgrep version 0.9 2012-04-06 21:26:48 +02:00
Araq
8aa4e46707 implemented incompleteStruct pragma; embedded debugger works with posix module 2012-01-05 00:46:51 +01:00
Araq
4f1b89c30c year 2012 for most copyright headers 2012-01-02 23:07:35 +01:00
Araq
00a4e19e8f clean exit codes for all the tools 2011-08-01 07:56:10 +02:00
Araq
0e7f2ca3f1 bugfixes; added events module, sequtils module 2011-07-26 00:46:41 +02:00
Araq
67a30d8371 further steps for thread support; bootstrapping should require unzip C sources and ./build.sh 2011-05-16 00:27:47 +02:00
Araq
71f7938d38 nimgrep: version 0.8 2011-02-03 00:30:26 +01:00
Araq
1eba1063bd nimgrep --ext support 2011-02-02 23:03:42 +01:00
Araq
5e657a4b34 nimgrep: support for multiple input files/dirs 2011-02-02 00:24:28 +01:00
Araq
437eb2c37e nimgrep: first working version 2011-02-02 00:05:55 +01:00
Araq
2fb8ced454 commit before ov-res changes 2010-12-07 17:11:28 +01:00