From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5648 invoked by alias); 15 Sep 2016 03:08:02 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39335 Received: (qmail 14912 invoked from network); 15 Sep 2016 03:08:02 -0000 X-Qmail-Scanner-Diagnostics: from mail-pf0-f173.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.192.173):SA:0(0.0/5.0):. Processed in 0.790506 secs); 15 Sep 2016 03:08:02 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at brasslantern.com does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=KBKklceFTnbtaG2GddhVCRtrYgt1yh6w2D/vqJydqjU=; b=0+7SgNNHAxcw0QRR5OEz+aK+sZ7ubeL9+N3nVzFdoDL0f5whqtr6Q3BaQd8a4P36ic fsqbHhCQI7OOQ0VnPOzHYjrcN/pJM41is56XgL2tBwSrD1BV+8rUvWUvw6u6UTNlktgX lCbyiWMeOcHNHILqwZjcEG9LDPrOuFpVSwmZn393epvDg84+Vbhs1vtQOjRfG8GH56Cx 0zxxu4e0VyQvAgYPBN2L8girQlfZGuzbET+xEK3duajIhJWusNHQvUhVMnakYyTbQgml fQ5Yj0sHkt1AVZUPFALoK849nN0rHkwfKDrmY3gbMUdDEhHyQ+WuFOs9lXjr6oLDfOGG 54MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version; bh=KBKklceFTnbtaG2GddhVCRtrYgt1yh6w2D/vqJydqjU=; b=fKdcMSvM4fJm8qNnejcCNAWa4ZqSJPzQ5HB5P2lxD1/zUZo18024K5i9S/GzNuhcrR BIq0sDQB5hbhxZhA9//xJVAefWQrYY/lJ7qeuYYPf4pr97WJ/Cjb/fEzeQeoe1/30SRU LEeJRn85i5Hp2+/oVMa3sJuGBRB+BItPWX+vtVowR4351nh1+2QRs+/QP6OVk/xLeBlR r1i3EjKcTBBTmLzGtWN3Iyr2CDu/aA6NbbaChy4rm8d8XiXKQglZtp93t0EoF2DGzwkd UNgdEbFqddoLFGPlIjtkZiXc0SNYXDc1VmH+15uqx+OoAPfa43QH3B4TnOXpdmeM/XSf BB6A== X-Gm-Message-State: AE9vXwMnO+QZIwAG7sKFqgDB0B2ewuOliq9lAVjBs8VLoIMvZHm05cgbqCrTIhSFR6fFiA== X-Received: by 10.98.193.193 with SMTP id i184mr4016105pfg.69.1473908873870; Wed, 14 Sep 2016 20:07:53 -0700 (PDT) From: Bart Schaefer Message-Id: <160914200806.ZM32432@torch.brasslantern.com> Date: Wed, 14 Sep 2016 20:08:06 -0700 In-Reply-To: <67318.1473882755@hydra.kiddle.eu> Comments: In reply to Oliver Kiddle "Re: compset -q oddities" (Sep 14, 9:52pm) References: <20160911073031.GA19137@fujitsu.shahaf.local2> <160911191422.ZM21970@torch.brasslantern.com> <20160912230632.GA29577@fujitsu.shahaf.local2> <160912232853.ZM27002@torch.brasslantern.com> <20160914032254.GA32528@fujitsu.shahaf.local2> <160913222029.ZM13117@torch.brasslantern.com> <20160914061252.GA22452@fujitsu.shahaf.local2> <160914075946.ZM28998@torch.brasslantern.com> <67318.1473882755@hydra.kiddle.eu> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: compset -q oddities MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 14, 9:52pm, Oliver Kiddle wrote: } Subject: Re: compset -q oddities } } Bart wrote: } > } That's a bit tricky. I think it should append an escaped space, e.g., } > } "sh -c touc" should append . } > } > No, that's *exactly* the kind of DWIM-ing that we abandoned. If the user } > wants the space quoted, then he should start with "sh -c 'touc". } } For this specific case, I don't entirely agree because in theory the } mechanics are in place for that to work. Actually I think you *do* agree -- specifically, that the decision of whether to quote the space is the responsibility of the completer, not something that compset -q and compadd should always assume? } compset -q appears to disable the default suffix that completions have: } I'm not sure why. Any ideas? Not offhand. } Adding calls to compquote in every function that needs a suffix is } not a good idea. With a code refactoring, perhaps the suffix could } be quoted automatically but we'd need an option that makes it easier } to indicate that quoting levels should be closed (accumulating them } as completion functions call each other). And I'm not sure about } prefixes. I think you're just rehashing some of the reasons that we punted this. } One other thing I notice in the code for compset -q is that it is } a completely different function internally from that which does the } initial word split when completion starts. You're referring to set_comp_sep() ? I think it's different because it's simultaneously removing quoting and updating various positions (pointers/indexes into the buffer), but I could easily be wrong. } It'd be nice if vared could be used without the initial parse: } variable values aren't necessarily shell syntax. There are other cases where it would be helpful to be able to change the notion of what a "word" is; I think it was Sebastian who wanted to complete entire lines out of the history. Trouble is, that means either wrapper widgets to set up state, or a new class of completion widgets that get the definition of a word from ... where?