From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA2CDC433EF for ; Tue, 19 Oct 2021 16:30:15 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 539B0613AC for ; Tue, 19 Oct 2021 16:30:13 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 539B0613AC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 89F0B80F9D; Tue, 19 Oct 2021 18:30:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="ZFSN/oLz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 57F2F80F1A; Tue, 19 Oct 2021 18:30:09 +0200 (CEST) Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E5FF580F9D for ; Tue, 19 Oct 2021 18:30:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x829.google.com with SMTP id v17so496273qtp.1 for ; Tue, 19 Oct 2021 09:30:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=BXmQQArUIdcu73Ad4N0Mf/gxY1z7iqW3kLFzCtsaxhQ=; b=ZFSN/oLzn9L/to2rtnxe5/97Nm2uDbJwpSET9oPq3geunzxhbiPWc8NXWMEryDHVdq cUiYUmhGFej2cr1hRe1gdPtKz6cqvZIIBz56ZfsusBmsaN/ZzxweKBrdDDHXWSE3n9k2 KQcOA37BIsYC8hBnxtUQ7sUDniVxFc+UODa6Y= 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=BXmQQArUIdcu73Ad4N0Mf/gxY1z7iqW3kLFzCtsaxhQ=; b=ck5mW4LY4YfSRV6/KL0WO1XAv0lvyNSAFBEwL/iH1xAHIA8qCw4MKw5QU9IY4fhOOK BcsR6BBybZ/lmmSgJSh5aS1OXxWOi8fHctxuztATgfkGWqKQYmeTPiFhQFNbkCh7E32z mGdaRsY3POMDm14KvvFgZuy9gc9DHWMpydb8kWxqndgWjP81xBG3SbopzsoDbBs/n3zO t7+gjZca7JW0vTazlfYvtA3IxHwwCVF11DvXSdWHzu81IDwxQ4WdB/nG4I5Bd1NKmCwy qryd5ra5t7GRSP++25D3Ud14URiqChn5WoBvRAz5s0gWwY5V84XPxCgcOtXHBigEdfU3 FhrQ== X-Gm-Message-State: AOAM530etgcuIrL6PeXcFQ3xHnTHyIl+8Kxdi7qamM8EAPXJ1J0zGB2c 56bHgfK4hKwFTt5Oj3qzAg3PSA== X-Google-Smtp-Source: ABdhPJxstXwPOYLXsvqbIWKR7/MLrUclucrdgg8N3tG5y1rZpJOXnO34XpaVOvoHHK8GNq4KzmRq8w== X-Received: by 2002:a05:622a:1a28:: with SMTP id f40mr1054612qtb.1.1634661002737; Tue, 19 Oct 2021 09:30:02 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b01-cbda-b5ac-d4ae-96e7-5d3d.res6.spectrum.com. [2603:6081:7b01:cbda:b5ac:d4ae:96e7:5d3d]) by smtp.gmail.com with ESMTPSA id j23sm7638102qtr.23.2021.10.19.09.30.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 09:30:02 -0700 (PDT) Date: Tue, 19 Oct 2021 12:30:00 -0400 From: Tom Rini To: Simon Glass Cc: Wolfgang Denk , U-Boot Mailing List , Rasmus Villemoes , Heinrich Schuchardt , Joe Hershberger Subject: Re: [PATCH v8 4/8] env: Allow U-Boot scripts to be placed in a .env file Message-ID: <20211019163000.GI7964@bill-the-cat> References: <20211018181322.1181847-1-sjg@chromium.org> <20211018121315.v8.4.Ie78bfbfca0d01d9cba501e127f446ec48e1f7afe@changeid> <20211019140711.GC7964@bill-the-cat> <20211019142529.GE7964@bill-the-cat> <3573814.1634660430@gemini.denx.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nlzeMlS3+DG6Y/Tx" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean --nlzeMlS3+DG6Y/Tx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 19, 2021 at 10:24:25AM -0600, Simon Glass wrote: > Hi Wolfgang, >=20 > On Tue, 19 Oct 2021 at 10:20, Wolfgang Denk wrote: > > > > Dear Simon, > > > > In message you wrote: > > > > > > But how do we handle this? > > > > > > var+=3Dfred > > > > > > Is this appending to var or assigning to var+ ? > > > > It is assigning to "var+". >=20 > er... >=20 > > > > > > var++=3Dfred > > > > > > is unambiguous but very confusing. I think it would be better to disa= llow + > > > > It's neither unambiguous nor confusing. It is assigning to "var++". >=20 > What? Can you read that again? With the assumption that the append operator is "=3D+" and NOT "+=3D" then yes, your examples are unambiguous because =3D is not allowed in variable names, before and after. > > I think we should not change what is old and might be in use. > > > > It is much easier to change what is new and can be defined at will. > > > > If we define for example that "=3D+" appends, then we can > > also define our own escape rules, for example: > > > > var=3Dfred assigns > > var=3D+fred appends "fred" > > var=3D\+fred assignes the value "+fred" > > var=3D++fred appends "+fred" >=20 > I don't like that at all. It requires an escape for a common case and > is very confusing. Wait saying we'll add "+SOMETHING" is a common case? > Since people will be converting their out-of-tree scripts anyway, they > can check for this sort of madness at the time. There should be no > problem. I'm not sure I like saying the operator is "=3D+" rather than "+=3D" becaus= e=20 "=3D+" is a less commonly seen operator and tends to be an alternative appends for special cases / side-effects / position in parsing. --=20 Tom --nlzeMlS3+DG6Y/Tx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmFu8oQACgkQFHw5/5Y0 tyya8QwAhtkQot+5dDRh/JxiNflBpM6egrT1syN7V1P6eNyCx6SX4jIKNpXkJsva dRfCwOuXqFfraAwsGItFmi2xJgnxk+PQ3QChU2hxxl2O95w2asy9YKXNm8j1sH3A vUaZoD9HZ/NVgpvu/GHV79+yQ7QphRS+wz7tX5+YxlPa2vbgukT0Q8pOmtpjsNnj CvF6oFPYqLslzbh/Lb1pgaUfVi4KyGgjHg4lgFVqNIeS9Wg+K5BJFtFCe4SHXNl4 1EbHYScDFZFLeVgB+g2lSryGiE8xJGyB3tt1uaJAmVmpbWJ6ESW2w0/70t4b4VIa wtTYUGY1TW2DG9hRVJ/GjrxwEsfOETmsvGsrvCCdEIzg2RJgeLZl2+eBpDZlkNql +1MYC+M7T6tBtT5dqQtaH0EI1ge/2rRuHELJpepjg/UfQuc1Z69M9UchfLtj18u6 asYVnP5bJ0q2bIwxRoLKVOc5OB4ZvIR/kk+Dx//xspwMEJiz7hJHybVhUrZhliZJ 1TgakguE =6+e5 -----END PGP SIGNATURE----- --nlzeMlS3+DG6Y/Tx--