forked from beyondgrep/ack3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChanges
126 lines (83 loc) · 3.74 KB
/
Changes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
History file for ack 3. https://beyondgrep.com/
2.999_05 Sun Oct 21 21:37:39 CDT 2018
=====================================
[ENHANCEMENTS]
Add -p as a shorter version of --proximate.
2.999_04 Thu Sep 6 17:45:07 CDT 2018
=====================================
[ENHANCEMENTS]
Added -P as a negation of --proximate. It is the same as --proximate=0.
If you have --proximate in an .ackrc, -P can be used to cancel it.
Added --ts for Typescript.
2.999_03 Fri Jan 19 11:02:46 CST 2018
=====================================
[ENHANCEMENTS]
The check for whether we need to scan the entire file line-by-line now
reads 10M of file instead of just 100K.
Removed support for the ACK_OPTIONS environment variable. Use an ackrc
file instead. If you have ACK_OPTIONS set, ack will give a warning.
Lots of internal speedups.
2.999_02 Mon Jan 8 23:03:42 CST 2018
=====================================
[ENHANCEMENTS]
Added an optimization to make ack only do a line-by-line search of a
file if there's a match somewhere in the file. This gives ack a 20-30%
in timings of common cases.
2.999_01 Mon Jan 1 22:11:17 CST 2018
=====================================
[ENHANCEMENTS]
Added --pod as a filetype, recognizing .pod as its extension. This is
Perl's POD (Plain Old Documentation) format.
Added --markdown as a filetype, recognizing .md and .markdown as
extensions.
--pager is no longer allowed in a project .ackrc file. --match and
--output are not allowed in any .ackrc file.
ack 3's new features are listed below for now.
[FIXES]
--lines had some mutex options that were not getting checked. Now,
--lines is mutex with --passthru, --match and all context options.
=============================
# Release notes for ack 3.000
=============================
# New features
ack 3 is a greplike tool optimized for searching large code trees.
Improvements over ack 2 include:
* Improved `-w` option.
* `-w` option will warn if your pattern does not lend itself to
word matching.
* `-i`, `-I` and `--smart-case`
* `--proximate=N` option
* Added `--pod` and `--markdown`.
* Added `GNUmakefile` to the list of makefile specs.
* Added `-S` as a synonym for `--smart-case`.
# Bug fixes
* Column numbers were not getting colorized in the output. Added
`--color-colno` option and `ACK_COLOR_COLNO` environment variable.
* A pattern that wanted whitespace at the end could match the
linefeed at the end of a line. This is no longer possible.
# Incompatibilities with ack 2
## ack 3 requires Perl 5.10.1
ack 2 only needed Perl 5.8.8. This shouldn't be a problem since 5.10.1
has been out since 2009.
## ack 3 no longer highlights capture groups.
ack 2 would highlight your capture groups. For example,
ack '(set|get)_foo_(name|id)'
would highlight the `set` or `get`, and the `name` or `id`, but not the
full `set_user_id` that was matched.
This feature was too confusing and has been removed. Now, the entire
matching string is highlighted.
## ack 3's --output allows fewer special variables
In ack 2, you could put any kind of Perl code in the `--output`
option and it would get `eval`uated at run time, which would let
you do tricky stuff like this gem from Mark Fowler
(http://www.perladvent.org/2014/2014-12-21.html):
ack --output='$&: @{[ eval "use LWP::Simple; 1" && length LWP::Simple::get($&) ]} bytes' \
'https?://\S+' list.txt
http://google.com/: 19529 bytes
http://metacpan.org/: 7560 bytes
http://www.perladvent.org/: 5562 bytes
This has been a security problem in the past, and so in ack 3 we
no longer `eval` the contents of `--output`. You're now restricted
to the following variables: `$1` thru `$9`, `$_`, `$.`, `$&`, ``$` ``,
`$'` and `$+`. You can also embed `\t`, `\n` and `\r` ,
and `$f` as stand-in for `$filename` in `ack2 --output` .