From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id ACC952D0F5 for ; Sat, 16 Mar 2024 17:00:58 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1710604858; b=Fv1X+DzGbAdfkRVWeGUHGYPlexQDfvdUX2DVCDnBrNHB1XHlPFkIJzsrkdqDncvZMjvvtJ805D WuGIYy3rTYZDmOn5fa6RbqiAyME2209KVCglsOvG7nl4w20enJMcpMZzWXdiEBqvA7+LImzEsG ifZWcYg6dxqzANRf1PlIXo1nZWSi4ZhYCgjXKSY2l4hR3lcH3XiBy7wEOQ/H07fkBVreqcArxX JmOjxlTd+3vQlhYwA9ivC4j7JVYl0CkxS+ki85c6AoiZD0K9cjSKR3ecGYlP1/UpnqhUFyiGxQ l8P+8D2W+GLasfrz3qfS4WWnWwUhCUTp8zFiAbZ+8n2F5g==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-wr1-f46.google.com) smtp.remote-ip=209.85.221.46; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1710604858; bh=wWeDpgHzO7arrEeJBmzhOXaIjWes0S2dMPkcL1cJZww=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature:DKIM-Signature; b=cPoNqZmHitO/0JrqnPJL+Kxi5yiT1vGrCg0WfCqIMotiFbF2QVpuCRLMfqWMk7wQOpP0x+IgKN HAFd9Fdom/9mfREsm+p2Hxb9O9nMBSNlllznVBplpyAf2oP3S2WHxApHh3DAklLg/IksTiBvDg TLgjBSuBVwJuPpPrHZjpWeAgPBgaqqdZhYGT2kpmL6piS4V988KTdG5rAaLPO46YXvHI2eF9Db vO0Qe7QX0HF3FLhM7WVyqYHuiUvHz1ABykZpkcXl19MPNCoiXRRFAx7M17SuCfdiM02fmIAPMU mrjSVHcnJdID3z9IYCc2sPxZEcjvOK7UdYHRiTe8ldDxnQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=djs1FiCcBGplJhs1aXeSblFNFJ6wqMu9QLt+mk5FzPo=; b=Cy+1wxDD54fOiFDh2Jazb/44tu rrQyO4I94q6ondb4rf8MmKq9qVPxcN4CtqdOzBpqeuEkaksigNzp1pSQgwaTW96uYQiA7LQKkAc0X +kskve3rLfT72uZDXPF8TN8SehI9XOvPtYdUkxisyE9wRjDMQmxAOa64JYaNHVv6rboxTwDUODrGL f5wyrqluCyXn224Uian+Y3s33Zuypof0PQ82c5/uwwyJ8d6jpNP1ho/ObirgRon32wLfkrEnSLaRs T2D4HGPKQ2mYameQSMvGMXnWL7R1PquCREke9Ju/957WZZ4HHBeiuC3HCLWXxZAudVFlLlttNrA3l uK9cTzfQ==; Received: by zero.zsh.org with local id 1rlWSv-0008ne-Sm; Sat, 16 Mar 2024 16:00:57 +0000 Authentication-Results: zsh.org; iprev=pass (mail-wr1-f46.google.com) smtp.remote-ip=209.85.221.46; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-wr1-f46.google.com ([209.85.221.46]:52296) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rlWSe-0008TY-7Q; Sat, 16 Mar 2024 16:00:42 +0000 Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-3412f49bac7so161185f8f.0 for ; Sat, 16 Mar 2024 09:00:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1710604839; x=1711209639; darn=zsh.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=djs1FiCcBGplJhs1aXeSblFNFJ6wqMu9QLt+mk5FzPo=; b=RWZ4Kzg9eOWiIPVb99ccdHArqzcuf8nYZoH0iP5pdr7lMUxIGzyKSWp188hKtf0Q/a XG95MnbyMXsCIIP/cjNizLfpPhs9qYYI+KZ+KFL/TZpniM7I3ztlW9C1HMUgT1ksGi9u BYg6+TpZ4/dp1UaZiZKJN8QdmFIX36xK11vahH1B+Tva3xqU46PDge3oLYmmZ1+g39tz CjAByZyJw3BZpQLQFO8DHCDfqVjXLh40d1fgHgXss4rlb1U8ASYHNT4JKhED/bfAmN7O dlgirXrtMIW5mw2vQ1ObDvk7U8mBXXoJ9VXdQRmHNe8NGnLX44caKZBV5Gr89Y0U2gDU RY5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710604839; x=1711209639; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=djs1FiCcBGplJhs1aXeSblFNFJ6wqMu9QLt+mk5FzPo=; b=HuycPHWaDrsc1+3jCtGC9dDkLUub8kRoikQt4Ybx1ksRvxD7FBsum+P2MJLaqkjalf JUL8X/X8HSSOJG8iBst8lbUNxvZnSVGxd/co2+qOGg7sZMslaVNwGsccKgCg9bleG7o+ o4CYJp1LmSlWX9nB7V84Udv/cxgw72lZ8q/K3U0w4XDDVrF5P6PXA+CQjtavWVEib4hD yUpEJhIEgfz5lua0hULsH3deur9U64S1fUcRiKe63yW0qsyxFdduNq8++W2Yc0WTaRbl 7WzSDUjn3rJXJhZIy6IOMe/Yi/pOt3LyIY9dCLVOgRa/S+lJy/MzuBSe/M/CJll1F9Bu rYiA== X-Gm-Message-State: AOJu0Yw3MFCX2z2RoUXCsO4vUzQsm0DUMZTxDtARfpenMHhlce1Mdv2O 0SC8QFhjN/iP2nSNE0+0X2UTJ971Pjk72yudwoWs4Zh/6FR20grslf5nNDjAuiYdpAQWEZqMqGK XkpRfNHhZ0qf+AlxVQekdrZOypqj/awaECC8eMrLX1ADSn6s= X-Google-Smtp-Source: AGHT+IFjJeYSx2gZaMQqCKtqc4zMCRQRSa7N8RXhnDk7vL7dAQf6FuaRIxc9xkB9Hi3drDqctiqqNx3fh6SQMI28l/Y= X-Received: by 2002:a5d:60c6:0:b0:33d:dcd4:9d8f with SMTP id x6-20020a5d60c6000000b0033ddcd49d8fmr1647553wrt.65.1710604839481; Sat, 16 Mar 2024 09:00:39 -0700 (PDT) MIME-Version: 1.0 References: <20240313123817.GA3492761@cventin.lip.ens-lyon.fr> <20240315125317.GC3738413@cventin.lip.ens-lyon.fr> In-Reply-To: <20240315125317.GC3738413@cventin.lip.ens-lyon.fr> From: Bart Schaefer Date: Sat, 16 Mar 2024 09:00:28 -0700 Message-ID: Subject: Re: HIST_IGNORE_DUPS also ignores command lines that differ by a space between quotes To: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52765 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Fri, Mar 15, 2024 at 5:53=E2=80=AFAM Vincent Lefevre wrote: > > On 2024-03-13 22:13:09 -0700, Bart Schaefer wrote: > > Doing a full syntax analysis here would make it a lot more complicated > > and a lot slower. > > I don't think you need to do a full syntax analysis. Isn't this just > related to tokenization (something like that)? Tokenization is performed by lexical analysis. > Note that spelling correction, which occurs *before* the line is put > in the history, detects quoted text and won't try to correct it. Spelling correction is actually performed by the lexer, at the same time as alias expansion. > it seems that "quoted status" can be taken into account at that point. Not without separately storing both the original and lexed state of the text. Which is in fact done internally, but for hopefully obvious reasons is not done in the history file, which (during reading/writing) is where most duplicate elimination has to occur.