Skip to content

Commit

Permalink
0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Nov 2, 2022
1 parent f714931 commit 91db6db
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
7 changes: 7 additions & 0 deletions Changes
Expand Up @@ -2,6 +2,13 @@ Revision history for App-Rak

{{$NEXT}}

0.2.2 2022-11-02T13:11:04+01:00
- Change default for --proximate to off always, instead of 1
when --human is (implicitly) specified
- Fix issue with regex patterns in --patterns-from, spotted by
Zer0-Tolerance++
- Documentation tweaks

0.2.1 2022-10-30T12:50:04+01:00
- Add support for --type=equal
- Add support for ^string as a shortcut for --type=starts-with
Expand Down
2 changes: 1 addition & 1 deletion META6.json
Expand Up @@ -58,5 +58,5 @@
],
"test-depends": [
],
"version": "0.2.1"
"version": "0.2.2"
}
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -1179,7 +1179,7 @@ $ rak foo --per-line='*.lines.tail(10)'
--proximate=[N]
---------------

Indicates whether matched lines should be grouped together that are within N lines of each other. This is useful for visually picking out matches that appear close to other matches. If specified as a flag, indicates a proximation of **1**. Defaults to **1** if a human is watching, to <0> otherwise (indication no proximation check to be performed).
Indicates whether matched lines should be grouped together that are within N lines of each other. This is useful for visually picking out matches that appear close to other matches. If specified as a flag, indicates a proximation of **1**. Defaults to <0> otherwise (indicating no proximation check should be performed).

--quietly
---------
Expand Down
7 changes: 4 additions & 3 deletions lib/App/Rak.rakumod
Expand Up @@ -5,7 +5,7 @@ use highlighter:ver<0.0.18>:auth<zef:lizmat>; # columns highlighter matches Type
use IO::Path::AutoDecompress:ver<0.0.2>:auth<zef:lizmat>; # IOAD
use JSON::Fast::Hyper:ver<0.0.3>:auth<zef:lizmat>; # from-json to-json
use META::constants:ver<0.0.3>:auth<zef:lizmat> $?DISTRIBUTION;
use rak:ver<0.0.38>:auth<zef:lizmat>; # rak
use rak:ver<0.0.38>:auth<zef:lizmat>; # rak Rak

use String::Utils:ver<0.0.14>:auth<zef:lizmat> <
after before between is-sha1 non-word
Expand Down Expand Up @@ -681,7 +681,9 @@ TEXT
$rak := do if List.ACCEPTS($needle) {
my sub gatherer($haystack) {
for $needle -> &code {
my \result := code($haystack);
my \result := Regex.ACCEPTS(&code)
?? $haystack.contains(&code)
!! code($haystack);
return result
if result
|| !(result =:= False || result =:= Empty || result =:= Nil)
Expand Down Expand Up @@ -749,7 +751,6 @@ my sub show-results(--> Nil) {
$highlight := True unless $highlight.defined;
$trim := True unless $trim.defined;
$only-first := 1000 unless $only-first.defined;
$proximate := 1 if !$proximate.defined && $group-matches;
}
my $has-break := %listing<has-break>:delete // $break.defined;
# Switch to really large values if not specified
Expand Down

0 comments on commit 91db6db

Please sign in to comment.