On 7/31/23 6:06 PM, Bill Ricker wrote:
Options for your possibly odd use-case to make YOUR default let you
use ack with minified JS -
any one of
* If you install the non-standalone version of ack, you can just
monkey-patch lib/App/Ack/ConfigDefault.pm commenting out the two
Minified JS lines.
o if you clone from github, you can upgrade with *git* *pull
--fast-forward* and keep your changes
o (Or. If you prefer standalone, you can clone or install the
sources and follow the README steps to build, and install the
ack-standalone as ack.)
o you could also monkeypatch directly in the bin/ack (likely a
copy of ack-standalone) , comment out the same 2 lines)
* (echo "--ignore-ack-defaults"; ack --dump | ack -v '(?=.*js).*min'
| perl -plE 's/^(?=\S)/# /;') >*~/.ackrc *
o (or copy contents of ConfigDefault.pm's heredoc into ~/.ackrc,
commenting out the Minified JS section, and add
--ignore-ack-defaults at the top;
this makes *nicer comments* in .ackrc !)
Those are both possible options, and I'll probably end up doing the
second, just because I already back up my .ackrc and copy it to new
machines. If I have my own copy of ack, I'll have to remember to back up
and copy that, and keep it up-to-date with the main copy. Admittedly
that's not too hard, and I already do it with a couple other open source
things I use, but it's "one more thing".
Comment: since you like searching minified long-line files blocked as
too ugly to view by *
*
*# minified JavaScript
--ignore-file=match:/[.-]min[.]js$/
--ignore-file=match:/[.]js[.]min$/*
you may also want to search the things suppressed by
*# minified CSS*
*--ignore-file=match:/[.]min[.]css$/*
*--ignore-file=match:/[.]css[.]min$/ *
so i suggest you consider commenting out those two as well to minimize
surprise, or not, as you prefer.
Yes, I'd planned on commenting out/--noignore-file'ing minimized css too.
Thanks,
Brian
--
You received this message because you are subscribed to the Google Groups "ack
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ack-users/84425f50-3ca8-62d4-54d6-71eb3e95a7eb%40gmail.com.