From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25110 invoked from network); 17 Oct 2023 16:45:12 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 17 Oct 2023 16:45:12 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1697561112; b=Y1psFrkREnk/4cb2mQOz+JQPc2wX/h8QKmrWEfDRa4B2B5tK/iojS7gFuPjI5UJgdYbZI+Vjph YmRanEx2JyGjrz+9W0uWoOSFY5bqByQqhiii/GTE+06Oy1hE5ID3eO+PaPJ5jLduancoOkkOuJ 7K9hMjKe3oC1F5ENlsBOC93sg1hsdzQUXPsc7et4/JSzmvEKM/LNLLTXXSFwqGk0pAVnyt7jMD YtMMJl87RYVcpfIBpwCIuHXxPITN4zSAV3xwMNQchcoxgMiditbl7o/MjkPISOlcoVqOHa5k/g nSPeQd2YxvGGTXRXusb1eV/PjSBw31x10qpi8DLvR1Ov1Q==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f44.google.com) smtp.remote-ip=209.85.208.44; 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=1697561112; bh=T1xxGGquH4CZ53H4CexxG2q72qSSP9IzRo6J9KC9MMU=; 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=ak73lcnWKQNtakq8e8jmovY7jzo0MWurS6oKvAL7aojARMT+/Kh+YUCOGihmY2/l/E7hb07f41 ESa509QamWfvna/WVs/vPnyHDiZx2y39FE2z58YQWcMyrWl/Gh2M/of/+9sd9P50vE1QGuTeIJ PZNZsLxq2RdA63WMW6ZB6ZNtiDHVAVejwFL9AkfvCD2647lJcibWGxg5yw+XEomGKoYlqtkest d8nNcHHwys0+LTCJmqM+Xan8qS1i97lrCVhu0DIRuhfgD3Z34dC+y8BrkOIjrgNNRpvoZZfwtw IphP9NKu1t6PEkKs3p7uIYolZ1us0kJ/LFzVLU+0fRvpRg==; 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=IpbO3aRTDgo42lkX9Sb8mhsZHRcOxt2ukCnjdjSSpxs=; b=E71J7RQh607/BJdtPV18w3uyrY R1RrBH7HDBmWQAvuQehzVhyjMb5mf43voGTZjCSNOPWcNFYKI6MAy5UUDJSkhkbKLqQJcSvPnuEZw 3hNznm9Uxj5VRH8Tgf2kgPmMB25t8nhFSFgR/QGXGRn01QiSyWQUds1ouuraqAhGFV7XqoA5fLikq c0T0bj44QGqMUpQV97RpDTbxl3dT2KPpTpJODflXxXT48bmsG5F9czLqwjFzEzSM1o1P/5VQ5F53I JeqGEMRShrsyiWDyCbmeQUCfexEAWagAyYyVQUHJNFTr4dWzMER9Cfsx65zIgVFLfZj1wr9wT8CxO 2TYNtvqQ==; Received: by zero.zsh.org with local id 1qsnBw-000ONB-Go; Tue, 17 Oct 2023 16:45:12 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f44.google.com) smtp.remote-ip=209.85.208.44; 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-ed1-f44.google.com ([209.85.208.44]:55741) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1qsnBg-000O4C-EJ; Tue, 17 Oct 2023 16:44:57 +0000 Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-53d8320f0easo10112627a12.3 for ; Tue, 17 Oct 2023 09:44:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1697561095; x=1698165895; 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=IpbO3aRTDgo42lkX9Sb8mhsZHRcOxt2ukCnjdjSSpxs=; b=RC8aunq2lhMdfbTRzfeINdH5b+8d+yygpZ5Um9hZO12wCt+DldRG+u5ofRfF48Pk2x Y1/QnCcKxWCrX/KMgBu3gu1TONZFKbU6IzZjJZ2znbbRzohUbgS7rC/9+NJnTekGVHka pShCkctB4dOqnkkVKQq86VP7bfPoAJxagRBGNdcd6GO++SYEkFCuZ8txtEnlZcMBUPVX KzzRe4wg6MpBqMBpAwi0J7JjSQje3kGLUrDSGhtIlOpW0LTI8OKLKAkmDDKkuK6PXLBs ICm6kPzMPzWQVFaXGGaFSPONOoeOep7roXPj50m6YxxcFEeVIS7RScQ0GzIedae3QdiA BnHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697561095; x=1698165895; 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=IpbO3aRTDgo42lkX9Sb8mhsZHRcOxt2ukCnjdjSSpxs=; b=mHat+tZUq3jHner7vHj9lvepduhBJdZXjHmKPgjvRv6lhmV1N+2MIthDNBC3I0cSy3 l9hgtcqhb59CxPt3ZvLHO3NN0gxtEdVeuzXY2Xyp/SxGtBw73cwHD6U7/EJspAJWjvQQ Rjds0OrvvZ9cOzhKLpKw61HcD0Vn+iSBA2STXsYXatV+jvTVVU+OHdMkB9Hp6N2u3qSh /PkXjs+spTbwFGrguDJx//j4LhBHGxSg0qYT6lHmYzMF6xyXK+z4E8LDWY/yk/7P0WgH MuUihY/EC/3bpmgCNtacduad1WD74hWUXqHJ70D0R9bvIDhHG+D76ZXd0nbQ/HemAeGL UmMw== X-Gm-Message-State: AOJu0YzPuR3YJS4RHtWLii3kvxDbJkFdz8v4BT8eaMQLwK8CykNe7Lrv zgfl9WCtzgOll9Xp/nZxdcmtwVUORpJEIJ/pObuPutavYL0vf9dX X-Google-Smtp-Source: AGHT+IFzDuvIkdT1RtAyjptj/l9BOAo5DvuNInzadt7EA3Slow0WsBjYWzRKdZIZutswxUDE4U6Z1GN72hvz+xDcv4A= X-Received: by 2002:a17:906:dacb:b0:9b8:5b0d:b55a with SMTP id xi11-20020a170906dacb00b009b85b0db55amr1831122ejb.54.1697561095657; Tue, 17 Oct 2023 09:44:55 -0700 (PDT) MIME-Version: 1.0 References: <20221211175001.u7dqfrnnzylsbjan@chazelas.org> In-Reply-To: From: Bart Schaefer Date: Tue, 17 Oct 2023 09:44:44 -0700 Message-ID: Subject: Re: a='foo"'; echo ${a/foo"/"bar} outputs bar To: Zsh hackers list Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52230 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 Tue, Oct 3, 2023 at 9:20=E2=80=AFPM Bart Schaefer wrote: > > I had an idea here that seems to work: while reading single-quoted > strings in gettokstr(), recognize when we're in a pattern and replace > all / with \/. That only fixes '...' and $'...' at best, though. > > So, back to workers/51202, my original reply on this thread: handle > double-quotes in paramsubst(), leaving single quotes to gettokstr(). Any comments on this? Worth pushing?