From 1750b47a536947212aae95820bfa2a26beb68c99 Mon Sep 17 00:00:00 2001 From: Elizabeth Mattijsen Date: Tue, 14 May 2024 19:41:03 +0200 Subject: [PATCH] 0.2.26 --- Changes | 7 +++++++ META6.json | 4 ++-- TODO | 2 -- lib/App/Rak.rakumod | 15 +++++++++------ 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Changes b/Changes index 980c34c..e515a58 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,13 @@ Revision history for App-Rak {{$NEXT}} +0.2.26 2024-05-14T19:25:29+02:00 + - Upped dependency on "rak" for fix on hyperizing 2MB+ + text files + - Adapt "only first xx matches shown" message depending on + whether they were actually shown, or written to a file or + pipe + 0.2.25 2024-05-14T12:47:25+02:00 - Ignore --progress if STDERR is not a tty. This allows --progress to be used as a default diff --git a/META6.json b/META6.json index b5814da..7b9d669 100644 --- a/META6.json +++ b/META6.json @@ -14,7 +14,7 @@ "IO::Path::AutoDecompress:ver<0.0.2>:auth", "JSON::Fast::Hyper:ver<0.0.5>:auth", "META::constants:ver<0.0.3>:auth", - "rak:ver<0.0.55>:auth", + "rak:ver<0.0.56>:auth", "String::Utils:ver<0.0.23+>:auth" ], "description": "21st century grep / find / ack / ag / rg on steroids", @@ -59,5 +59,5 @@ ], "test-depends": [ ], - "version": "0.2.25" + "version": "0.2.26" } diff --git a/TODO b/TODO index 1cb3ef9..d4f04bb 100644 --- a/TODO +++ b/TODO @@ -17,8 +17,6 @@ Ideas / Todo's the rest of the pattern as a JSON::Path specification. - XPath en XML file support - add Log::Timeline support somehow -- Allow for hypering withing a file if the file is larger than X bytes - (probably 1MB) - conflicts with variables set in default custom list, should not result in errors, e.g. making --smartcase a default, and then specifying some combination of options incompatible with --smartcase. diff --git a/lib/App/Rak.rakumod b/lib/App/Rak.rakumod index 8ce99bc..6f2817a 100644 --- a/lib/App/Rak.rakumod +++ b/lib/App/Rak.rakumod @@ -5,7 +5,7 @@ use highlighter:ver<0.0.18>:auth; # columns highlighter matches Type use IO::Path::AutoDecompress:ver<0.0.2>:auth; # IOAD use JSON::Fast::Hyper:ver<0.0.5>:auth; # from-json to-json use META::constants:ver<0.0.3>:auth $?DISTRIBUTION; -use rak:ver<0.0.55>:auth; # rak Rak +use rak:ver<0.0.56>:auth; # rak Rak use Backtrace::Files:ver<0.0.3>:auth < backtrace-files @@ -815,9 +815,6 @@ my sub run-rak(:$eagerly --> Nil) { meh "Searching for binary data NYI, did you forget a --find?" if %rak:exists && !%rak && !%rak; - if $debug-rak { - note .key ~ ': ' ~ .value.raku for %rak.sort(*.key); - } if ( %global.keys, %result.keys, %csv.keys, %modify.keys ).flat -> @unhandled { @@ -829,6 +826,10 @@ TEXT } %rak := True if $eagerly; + if $debug-rak { + note .key ~ ': ' ~ .value.raku for %rak.sort(*.key); + } + $rak := do if List.ACCEPTS($needle) { my sub gatherer($haystack) { for $needle -> &code { @@ -1135,8 +1136,10 @@ my sub show-results(--> Nil) { } } - note "** Stopped showing results after $seen matches **" - if $seen > 1 && $seen == $stop-after; + if $seen > 1 && $seen == $stop-after { + my str $what = $writing-to-stdout ?? "showing" !! "producing"; + note "** Stopped $what results after $seen matches **"; + } } # Statistics to show