about summary refs log tree commit homepage
path: root/lib/PublicInbox/Reply.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-04-16 16:10:35 -0700
committerEric Wong <e@80x24.org>2021-04-17 10:00:45 +0000
commit74c0a24d49855321883f23decd687a1a866df24e (patch)
treed832b2e99a364b98f258f845c29aa60c33e1492d /lib/PublicInbox/Reply.pm
parent1e51bc86dcdc25363575f6e9b35d954c65dec795 (diff)
downloadpublic-inbox-74c0a24d49855321883f23decd687a1a866df24e.tar.gz
A user may wish to clobber/refine existing search parameters
by issuing "lei q --save" again.  Support that by overwriting
the lei.saved-search state file entirely.

We continue to preserve over.sqlite3 for deduplication purposes.

This way, we don't get something redundant like:

	[lei]
		q = term1
		q = term2
		q = term1
		q = term2
		q = term3

...whenever a user wants to refine their search.  Instead,
we'll just have:

	[lei]
		q = term1
		q = term2
		q = term3

On the second go.
Diffstat (limited to 'lib/PublicInbox/Reply.pm')
-rw-r--r--lib/PublicInbox/Reply.pm10
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/PublicInbox/Reply.pm b/lib/PublicInbox/Reply.pm
index 2a1066d2..79dd46a7 100644
--- a/lib/PublicInbox/Reply.pm
+++ b/lib/PublicInbox/Reply.pm
@@ -9,15 +9,9 @@ use URI::Escape qw/uri_escape_utf8/;
 use PublicInbox::Hval qw(ascii_html obfuscate_addrs mid_href);
 use PublicInbox::Address;
 use PublicInbox::MID qw(mid_clean);
+use PublicInbox::Config;
 
-sub squote_maybe ($) {
-        my ($val) = @_;
-        if ($val =~ m{([^\w@\./,\%\+\-])}) {
-                $val =~ s/(['!])/'\\$1'/g; # '!' for csh
-                return "'$val'";
-        }
-        $val;
-}
+*squote_maybe = \&PublicInbox::Config::squote_maybe;
 
 sub add_addrs {
         my ($to, $cc, @addrs) = @_;