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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26412 invoked from network); 23 Nov 2020 17:32:19 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 23 Nov 2020 17:32:19 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1606152739; b=yaEaoqgNEDPT0Hk7EdU/vbzYRAfUELfJ08qIXiOA8VDavtnVN9WJQ1p2LVhnj6s0PlIY9Grh+H 6k1Rb7MqDnXMR0nkfrVk8KAMx7twSqn2xHSzBSdZpKFE7aZ73NjbUpCtwcDfd2HB699hZWSkxK 53IeI53afcwRZ4wcF65C1kP8Bw2kuNleqMNrdifSJcuM/6wvZXw7sKSWPasxmipZFYkkzWYpsO 64izDF4hS6vavec4PLL/aIH2h8UMuZUvdnWkvLBLOk4y/8SbJ6B7sB77XqKlPk6yvw6KNXydLe /znWx525KVDPmsLm6HUTMGdfEe1aA8ZlKH4W5eQzdFZ3fA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f176.google.com) smtp.remote-ip=209.85.167.176; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 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-20200801; t=1606152739; bh=qn5G4LEo9qmzVdW25CGkCnIFjwDznzcMUzwJE1J8XRQ=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=MYZSGAXQgAz5Tju1SjenL1Ipl8GHGJX3EG6M5tWMOuBwFx6s3PpqDkT3k0IXcHMZyslT1aZ9O+ eOyv5QMlC00CxLj0W+/27FCa+hap8xzfsgTtoOQ/RYTZKGCxRcpzg6rLTapaWSPODQDlLlrsbu 1Ead5O/1Ngj6i0y40uIQ+FwBFvEJTH1vdUpYbtjvfWv6/2z0H7x6KX61HImSsIKOWlOxqigF/m r4gBa7melAv3uKovx5jSldF2VSf1iroG3bEK1RdAuLz8Z4AMYfbcilZiCProNfPkE4fV1Vmjpd vvrFLw7Ly7OSqhxZhe80ukcfg0ks+oye7gwEK2BEUFgLWw==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=ON88D6BcMSoEvCerQRithR6Qn1d6sITKgOHuxXYrPUU=; b=KG2XibGhYGYr2KBlNnBKB34VDb QD2bqKP3f4YmcWnhINOSGZbL27p7THfwkXaJWGTSa52clOZgrDhQPpcProwrW+8zn4wvl6TFzZq2C vQ/ihi7QA//m6Ipf6DdZ2pS6diHJF+8JTFapOzal0+x6H4sV+zH07VkH6pad9Tp/BQ4+s5b5pdVQR Lx19e2gj4oHKoy1C3XG5D3GUh7V+0grf69rysRk6zMlMJNOMQ6s9g3g7iLGu6VtdaiX6YYR0IfM6S 5QXKKLgt4g78PeG6lkprmi9+J/lO+RFDFaTg5gM3M078iGwxErsqKauPXJQXnWZSfMOeB4OLLOtKS aiT1S3gw==; Received: from authenticated user by zero.zsh.org with local id 1khFhL-000JvT-42; Mon, 23 Nov 2020 17:32:19 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f176.google.com) smtp.remote-ip=209.85.167.176; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-oi1-f176.google.com ([209.85.167.176]:46049) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1khFh5-000JmR-96; Mon, 23 Nov 2020 17:32:04 +0000 Received: by mail-oi1-f176.google.com with SMTP id l206so20451221oif.12 for ; Mon, 23 Nov 2020 09:32:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ON88D6BcMSoEvCerQRithR6Qn1d6sITKgOHuxXYrPUU=; b=RShjc4sLJ1UdSVLiYzmw0R8o886xE5g6m8G7nJADkJeX9VAmddWmmi2X/0MpzVFrh2 5qQdhLHiz6M9m8PzAResqRlp1s9LBQB+29oB2z6UM7FyX8p+ciCILNR1OHFvEGoxy1Fr W2NODvDW6mLn6gSo72wLuxc9PHNdOmTT0Wx2nKWQ1hOBUD4SfApvGFFgksfY6wapd90s ojcEA1o8cjthErK3FIv2p3Mkr0+D5T3yyp7Yzw68WZYhrZ8p98Bjwf9KKlayYJSFc+sP EqEBaG9DADHAOgAUOTW+y03c98G6ZMDtJc2xvM2/6BFktFpKFua5vF8BkVhNrlwB+Vk/ bPzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ON88D6BcMSoEvCerQRithR6Qn1d6sITKgOHuxXYrPUU=; b=VNy8eHXGxojdO3F1Bosi/a1tjz/yhR6Uc+lrlDM5lhQyHGH+JvsrJV7w3U3+mIPW3E CeqEDeS5zeBRYpREPL3fABTcxWikB8fjosQ7RfKRAm/TS7TkzojfgJD+12Tgm/DvlF7u XkeznepVWWCBl/6C0sNPSgr5Fobw26hN8JHek5AN0G2er7sYshLbiHK/BhN/+BQzkr8t 1aJ+qhaXlWGKB3vY84ihbiF9Mv1y1PiQcBLdI85zgLz85W2ebe71vo/C8EuoXHq255kz j2KJCFj0y+oPntEcft51t0VOAWjgoew8yHF63RpJ5ZUShFITCoLNMMgq47RFyN0isvfg ys8Q== X-Gm-Message-State: AOAM530ySUxye0/J2uUfBk23kMk5M8c0t5rUrcDtg3MZ550X8PnhUO0B Y0+abf+Colfk97Xh5QeFQWQvXPTrZuRx8sncXSttfA== X-Google-Smtp-Source: ABdhPJy+VWCiay6q2/UGjcqJ0lOfsmQDm2lckHZUXjD73oVG8PuVOuGLXZg3qXvpej+Xq28d1edUYEGb3kF6/5nrj7o= X-Received: by 2002:aca:bd45:: with SMTP id n66mr210990oif.132.1606152721749; Mon, 23 Nov 2020 09:32:01 -0800 (PST) MIME-Version: 1.0 References: <69b1ff42-3e60-4b40-8514-9bb0690eb250@www.fastmail.com> In-Reply-To: From: Bart Schaefer Date: Mon, 23 Nov 2020 09:31:50 -0800 Message-ID: Subject: Re: Bug in completion with curly braces? To: Felipe Contreras Cc: Daniel Shahaf , Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 47607 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: Archived-At: On Sun, Nov 22, 2020 at 10:46 PM Felipe Contreras wrote: > > Yeah, this almost works, but I'm not interested in hacks. [...] > I'm not going to add dozens of lines of code just for this corner-case > depending on the value of $1. If compadd doesn't work on this case, > then it doesn't work on this case. There could easily be more documentation around "compadd -Q", because really it is itself a hack. The parts of completion that analyze/dismantle the string on the command line, before _main_complete or another entry point are even called, are always going to process the line as if special characters that are not quoted do in fact have their special meanings. The real purpose of -Q is not to disable quoting, it's to indicate that the calling function has already applied the appropriate quoting and therefore compadd should not also attempt it. Consequently if the calling function does not apply quoting, -Q is only going to work well in cases where the matches either have no common prefixes, or the common prefixes do not contain any of the special characters, or menu completion is going to be forced (so the user selects an entire match all at once rather than exit/re-enter completion with the prefix). (I would be happy to have someone (Oliver?) argue the untruth of that last statement.)