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: AS3215 2.6.0.0/16 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qv1-xf35.google.com (mail-qv1-xf35.google.com [IPv6:2607:f8b0:4864:20::f35]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id D61911F953 for ; Mon, 8 Nov 2021 22:37:00 +0000 (UTC) Received: by mail-qv1-xf35.google.com with SMTP id m17so783066qvx.8 for ; Mon, 08 Nov 2021 14:37:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=XePuB4pJ45gRMFh9S/2FpFDlwmjQPKqTW190ak6GUV8=; b=HBJMSYaefOrsrbv11RmqYhw+aCG0C5Tlsl7/yjTsNs6y+gxvAD5lzt6fa3+fIo+Zvw R9DypfnM8PfYltkjtihSbWk8wCKswTQJt0/fsnObWUh0gglFA1hWhjYSauF9sPJs3mFz /pIl50aO41Kp5X+FyJZbVkhefOzYU7fhUOZjU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=XePuB4pJ45gRMFh9S/2FpFDlwmjQPKqTW190ak6GUV8=; b=DjGPPplaE9OvtH1QU/qX9+plGcD4UZh5cMFF83JbO9sC7pwYO9QL7x5D80R0UaNaC2 EkxlfOMigRDMufcoJSa5sNZRFFiT47evcuNA1VeUK8lOLVIMS1aWmLxN5RARejg0US1Z pyUSL3ROZcQLeFsVqbDsKwaUTD9tk5Mvsc7J9TPCxYIPi04hrw5h5M1cAG/Xwv+7vOIw PXZF0a+ae4UHApQcC/4vgBPKxzYrjQAGty8s5jjAC+xdByLwtKnDbIk/cRT2Gj+ZSAuM rPWw+z9OCbx3mUqT37VWun2LzcKAy4KRXzV6y+8rQRiFjtIeKRuKt+98dOy6ToZCeATe 1emw== X-Gm-Message-State: AOAM531VU4Jr1kOutD/+zrthOBCK+a53wi/0JNwvAPS+YEGUq729W85x P5VY21RCbMYafInepIAszU96Xg== X-Google-Smtp-Source: ABdhPJwrb40uqLcrjNwUnWFaatFcUkO+ViJRQbM1Wlr9X/y2nf/v86we9giEX4JleKtM6aVNB863cg== X-Received: by 2002:a05:6214:2aa3:: with SMTP id js3mr22144251qvb.49.1636411019774; Mon, 08 Nov 2021 14:36:59 -0800 (PST) Received: from meerkat.local (bras-base-mtrlpq5031w-grc-32-216-209-220-181.dsl.bell.ca. [216.209.220.181]) by smtp.gmail.com with ESMTPSA id s127sm9423473qkh.61.2021.11.08.14.36.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Nov 2021 14:36:59 -0800 (PST) Date: Mon, 8 Nov 2021 17:36:57 -0500 From: Konstantin Ryabitsev To: Eric Wong Cc: Rob Herring , meta@public-inbox.org, workflows@vger.kernel.org Subject: Re: lei: incorrect quoting on saved searches (was Re: lore+lei: getting started) Message-ID: <20211108223657.jhsssoumfbmf4dhw@meerkat.local> References: <20211108202204.q5zg6bachnvbjlnx@meerkat.local> <20211108204923.GA12823@dcvr> <20211108213613.4hjtbokwzar7x4ph@meerkat.local> <20211108214836.GA21665@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20211108214836.GA21665@dcvr> List-Id: On Mon, Nov 08, 2021 at 09:48:36PM +0000, Eric Wong wrote: > > Hmm... I noticed that when I `lei edit-search` the initial query that was > > causing quoting issues, I get the following: > > > > [lei] > > q = (dfn:drivers OR dfn:arch OR dfn:Documentation OR dfn:include OR dfn:scripts) AND f:robh@kernel.org > > > > So, the extra quotes didn't get added to the config file. Running `lei up` on > > that saved search seems to do the right thing, so the erroneous quotes are > > only added during the initial `lei q` call. > > Right, each entry in lei.q is actually an entry in argv[]. > So the correct query should look something like: So, to be clear here... the following doesn't work because instead of multiple query parameters to 'lei q' the single-quoted string becomes a single parameter? lei q -I https://lore.kernel.org/all/ -o ~/work/temp/lei/robh-patches \ --threads --dedupe=mid \ '(dfn:drivers OR dfn:arch OR dfn:Documentation OR dfn:include OR dfn:scripts) AND f:robh@kernel.org' Any way to make this work? I find that it's more easily readable than the "echo | lei q" version. For bash users, the following should work as well: lei q -I https://lore.kernel.org/all/ -o ~/work/temp/lei/robh-patches \ --threads --dedupe=mid <<< \ '(dfn:drivers OR dfn:arch OR dfn:Documentation OR dfn:include OR dfn:scripts) AND f:robh@kernel.org' Suggestion, can -I accept the URL containing the query, so that the command becomes: lei q -o ~/mail/foo --threads --dedupe=mid -I \ https://lore.kernel.org/all/?q=f%3Atorvalds+AND+nq%3Agarbage This way we pass both the location of the extindex to query AND the parameters we should use, avoiding shell quoting problems? -K