-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathack
More file actions
executable file
·204 lines (174 loc) · 6.94 KB
/
Copy pathack
File metadata and controls
executable file
·204 lines (174 loc) · 6.94 KB
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<!DOCTYPE html>
<html lang="en-US">
<head>
<title>Beyond grep: ack v3.5.0</title>
<meta name="Author" content="Andy Lester" />
<meta name="google-site-verification" content="qm9jhn-etECEUlDgRf7gRtnJoSD1hmHOQm_iue_ng3A" />
<meta name="msvalidate.01" content="4EF6B7CF4E86418C29626DA5E8B28AF5" /> <base href="https://beyondgrep.com/" /> <link href="https://fonts.googleapis.com/css?family=PT+Serif:400,700,400italic,700italic" rel="stylesheet" type="text/css" />
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/favicon.ico?v=2" />
<link rel="stylesheet" type="text/css" href="/bg.css" /> <!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-631706-7"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-631706-7');
</script>
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Organization",
"url": "https://beyondgrep.com/",
"logo": "https://avatars0.githubusercontent.com/u/30610360"
}
</script> </head>
<body> <div class="nav">
<h1 class="logo"><a href="/">ack!</a></h1>
<ul>
<li><a href="/why-ack/">Why ack?</a></li>
<li><a href="/install/">Install</a></li>
<li><a href="/documentation/">Documentation</a></li>
<li><a href="/community/">Community</a></li>
<li><a href="/more-tools/">More Tools</a></li>
<li><a href="/feature-comparison/">Feature Chart</a></li>
</ul>
</div> <div class="billbox">
<div class="billhead">
<pre>
_ /|
\'o.O'
=(___)=
U
</pre>
</div>
<div class="billtext">
<h1 class="pkg_mgr_desc">ack is a grep-like source code search tool.</h1>
<h2 class="pkg_mgr_desc">The latest version of ack is v3.5.0, released 2021-03-12.</h2>
<p>
Designed for programmers with large heterogeneous
trees of source code, ack is written in
portable Perl 5 and takes advantage of the power of
Perl's regular expressions.
</p>
</div>
</div>
<div class="content">
<div class="feature-bullets">
<h1>What's new in ack 3?</h1>
<h2>Easier to understand error messages</h2>
<p>
The error message ack displays when the regex passed is invalid
has been improved. The message is more readable and includes a
pointer to the offending part of the regex. For example:
</p>
<pre>
$ ack 'status: (open|closed|in progress'
ack: Invalid regex 'status: (open|closed|in progress'
Regex: status: (open|closed|in progress
^---HERE Unmatched ( in regex
</pre>
<h2>New <tt>--proximate</tt> option groups matches near each other</h2>
<p>
A new option <tt>--proximate=N</tt> groups together lines of
output that are within N lines of each other in the file. This is
useful when looking for matches that are related to each other.
</p>
<p>
For example, these results:
</p>
<pre>
15: First match
18: Second match
19: Third match
37: Fourth match
</pre>
<p>
look like this with <tt>--proximate=1</tt>.
</p>
<pre>
15: First match
18: Second match
19: Third match
37: Fourth match
</pre>
<h2>Improved <tt>-w</tt> option</h2>
<p>
The <tt>-w</tt> option, which tells ack to only find whole-word
matches, did not always work if your pattern began or ended with
puncutation. ack would make guesses as to what your intent was,
but it was not well-defined. Now, ack disallows regexes that
begin or end with non-word characters.
</p>
<p>
This means that if you use <tt>ack -w foo:</tt>, the new ack
will not allow it, whereas ack 2.x would.
</p>
<h2>Added <tt>-S</tt> as a synonym for <tt>--smart-case</tt></h2>
<p>
For those without <tt>--smart-case</tt> always on, the <tt>-S</tt>
will be easier for when you do want to use it.
</p>
<p>
Smart-case matching makes ack do a case-insensitive search unless
the pattern being matched has a capital letter in it.
</p>
<h2>Added <tt>-I</tt> to force case-sensitivity</h2>
<p>
If you use <tt>--smart-case</tt> in your .ackrc, you can use
<tt>-I</tt> to force case-sensitivity instead of having to use
<tt>--no-smart-case</tt> (which still works).
</p>
<h2>Significant speed improvements</h2>
<p>
Run times for ack 3 compared to ack 2.22 are 30-40% faster
because of removal of unused infrastructure for plugins.
</p>
<h2>New built-in filetypes</h2>
<p>
ack now supports SVG, Markdown and POD by default.
</p>
</div>
<div class="feature-install">
<h2>How to install</h2>
<p>
ack is simple to install, via CPAN, package or simple download. <a href="/install/">Read how</a>.
</p>
</div>
<div class="feature-testimonials">
<h2>People love ack</h2>
<p>
"Every once in a while something comes along that improves an idea so much,
you can't ignore it. Such a thing is Ack, the grep replacement."
</p>
<p>
Read <a href="/why-ack/#testimonials">what else people are saying</a>.
</p>
</div>
<div class="feature-twitter">
<h2>Follow us on Twitter</h2>
<p>
We're all about knowing when to move beyond the stock Unix tools.
<a href="https://twitter.com/beyondgrep">Follow us on Twitter at @beyondgrep</a>
for tips, hints and software news.
</p>
</div>
</div>
<div class="footer">
<p>
Ack is copyright 2005-2021 <a href="http://petdance.com/">Andy Lester</a>,
<a href="mailto:andy@petdance.com">andy@petdance.com</a>.
Ack is free software; you can redistribute it and/or modify it under the terms of the
<a href="https://www.opensource.org/licenses/Artistic-2.0">Artistic License v2.0</a>.
</p>
<p>
Website design by Ashraful Sheikh and <a href="https://jeana.dev/">Jeana Clark</a>
<small>(available to fork on <a href="https://github.com/beyondgrep/website" class="github-logo">GitHub</a>)</small>.
</p>
<p>
Thanks to <a href="https://digitalocean.com/">DigitalOcean</a> for their support.<br />
<a href="https://digitalocean.com/"><img src="/digital-ocean-badge.png" height="25" width="120" alt="Digital Ocean" /></a>
</p>
</div>
</body>
</html>