From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 80BD51F45A; Sun, 30 Oct 2022 05:13:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1667106813; bh=74wayAuBggP/YbfeaTZ+q6/WwHkqRxYayjoozqTg63A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=f5auSTp66R2w11YSgjsj8ArtPJncMxzMufCmXSYwmcBwuvWUiFrtunvyJ0+EnFAIv Admeb9ALpFNvXIyocAcO0CguhAE8yKeSItUTEGUJ3R11WB7CSa03019D6y+iYaIRxM 8mJJNaYXtPGY/FHWYWLzCRRWJO/+dxavPwcaWp3Y= Date: Sun, 30 Oct 2022 05:13:33 +0000 From: Eric Wong To: Hangbin Liu Cc: meta@public-inbox.org Subject: Re: [Need Help] lei add quotes at the search Message-ID: <20221030051333.M329162@dcvr> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: Hangbin Liu wrote: > Hi, > > I used to use a search like > > lei q -I https://lore.kernel.org/all/ -o ~/Mail/liuhangbin --threads --dedupe=mid '((tc:liuhangbin AND rt:6.month.ago..) NOT (tc:stable@vger.kernel.org OR f:sfr@canb.auug.org.au)' > > It works on fc35. But after I update to fc36 with lei-1.9.0-1.fc36. It start to > add quotes in the search link and make the search never works. e.g. Are you able to show the curl CLI from fc35? Which public-inbox/lei version was it? I'm actually curious fc35 worked at all, since the quoting would've been broken, I think... > $ lei q -I https://lore.kernel.org/all/ -o ~/Mail/liuhangbin --threads --dedupe=mid '((tc:liuhangbin AND rt:6.month.ago..) NOT (tc:stable@vger.kernel.org OR f:sfr@canb.auug.org.au)' > # /home/Liu/.local/share/lei/store 0/0 > # /usr/bin/curl -Sf -s -d '' https://lore.kernel.org/all/?x=m&t=1&q=((tc%3A%22liuhangbin+AND+rt%3A6.month.ago..)+NOT+(tc%3Astable%40vger.kernel.org+OR+f%3Asfr%40canb.auug.org.au)%22 > # 0 written to /home/Liu/Mail/liuhangbin/ (0 matches) > > Do you think if this is a bug, or I should update my search. The %22 in fc36 is because your entire query is treated as one element in argv and matches expected behavior. Since '(' and ')' in the shell CLI is special, I suggest either: a) using --stdin to enter queries containing '(' and ')' b) quoting (or escaping) only the '(' and ')': '('tc:liuhangbin AND rt:6.month.ago..')' NOT ... or \(tc:liuhangbin AND rt:6.month.ago..\) NOT ... Which makes your argv something like: [ "(tc:liuhangbin", "AND", "rt:6.month.ago..)", "NOT", ... ]