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_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13133 invoked from network); 29 Sep 2020 15:00:52 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 29 Sep 2020 15:00:52 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1601391652; b=M705etB2KIQXodMeCgBO7Cn7gajqiJy3QC210g0xS401uIyUXZcx0oeTBBnTJEIWGiaBPwoeCi A8LjEXgCCQgNvI8kAMR/nZWk7PUpq1ZfFI2UmOJbBimWsxaZoBW/iipdE/Ly/FavEMnGqMxane +XyR06c4CY9sU0+OZyuFtUBKSmosyGZDB5jG3/ZeOvaXYHkMEFYAbAw2eX3KmRqYFbKB/Pfbg1 lPc2xDsw6Y6LTWlZ2Wcc93COQ7Re/4c/9/pXA+Nrmmof8Ee96w9gCOK8Qp+vvfqYq8/Ooa6Q6Z DhSemx/xX/9+zKYIriibcVtR3C/4DbyXtuD5C7tKWXROqA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-pj1-f49.google.com) smtp.remote-ip=209.85.216.49; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1601391652; bh=mmu1cdncAernZohF2kQG8Ro/PkTYAUFTOSZdPqy7EsI=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature:DKIM-Signature; b=go9ieKiYEcdIXry+DkKrOjXNo7veYwrcejrTDipnq1dNTfc31I22nOeFOOk+d6tFRXMJF/Vs5D 8QpBe8b8fv7T5MESG46kiWezUs/NV5qdu5aH9ejqYn+IE8iYdS872tJJJgDCzNctQRQwCkVC5V TAhi0M+29UEVBrBXqvn0ozg/aSeJudN9lWJM+MbabrSpodNOz17fHK3a/9LNB41Tml3mBUYEm5 fTENdZo3mxG5b+8NodlRJwS9Xyq1zijj9Jtm2KYHq+fYXq2DxsEe1xcbuUXYBY1+bwUbefPPXK GQsUYph8RPbOmX3OU9WQW20YlIwtBDu8BOo1ZDbga1HfFQ==; 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:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=Zc48R+OYy9Ukv4pc8Rx4i5JAhtsasxveN0uzzcg6V7Q=; b=X9rnE1RMINGArnKR6Q35fvuV6K +cMUamMK79Vl7jMH1bsI8CVlXbOfKSrqC/mLr/9M80YNJ4ljvtWO6Pq5P2Y4P2J+ZoDv14qgMnX9j TJTnBopsqOQNsXKtx6Zt3KxrK201YbSAPWeYSUFshbFbh/4H8lj+Xs7LMHQdUqmz5dDf5i5q8nujG ijO6BKH3JMarMuxi+QlpY/lcVv1bn1hIvyS7xJ+ZnptDHUTrfn1YS8aghfJI/69SdGNQTaBtaQvUw TnnbTbCVpUcR0/u50kVkxf9aejnMpDYQ3V61PZ4RJjTFfCGD9112Gck+j9i5c7Sq5h1ou5khwSS0W dmAIBoCw==; Received: from authenticated user by zero.zsh.org with local id 1kNH7a-000K8T-Nm; Tue, 29 Sep 2020 15:00:50 +0000 Authentication-Results: zsh.org; iprev=pass (mail-pj1-f49.google.com) smtp.remote-ip=209.85.216.49; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-pj1-f49.google.com ([209.85.216.49]:56079) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1kNH7L-000Jz9-6D; Tue, 29 Sep 2020 15:00:35 +0000 Received: by mail-pj1-f49.google.com with SMTP id q4so2803156pjh.5; Tue, 29 Sep 2020 08:00:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:disposition-notification-to; bh=Zc48R+OYy9Ukv4pc8Rx4i5JAhtsasxveN0uzzcg6V7Q=; b=BfR6b53TEkkvjAxeNWU7d4euguYrePTAQsySGTN2hcuLpq7k4lb9oZMcJQR7I8Wbzf 9qGrxlzq4ntR7TQ+rozulEBQCbEzKi8+R+zhSL2qqx0tNFpHilbGliWchyzr3NDm/uVF LoaI6HRT0SeSxDq6CyOwuvImHozVg03MT7TQRXVkcopc0IXreTWk9t2qNCYhZhVKkAgB V6/5+/T/61aU+WXc4O6pkrAEurx13OWshuCZmVeAJmo6Qhl+2ILwApIgA/wyb8Bmgj8I N0KTZ3A2EB06N8lMvns5IrgcXVa3oVTQ4WuxmNcr1yxvkQpffuoMF/h8ih0V6BgIR/ol z7vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to :disposition-notification-to; bh=Zc48R+OYy9Ukv4pc8Rx4i5JAhtsasxveN0uzzcg6V7Q=; b=NliPhq4TCy+ERkYu5+b+hWFPOGvzGs1FqAPmcBqt5/LohcUp9s7e966pjO+b9HVMTK sgU8+BCQSSPaX4Kh1yK0GxOabIzhfyX3Y9RZ5VLX0TJMP2POOmdgy3DIRD1q7BFp89ea JRNvZqqODoh8WHXHvVa8XN2Yfo3D/OHlLtwTQcGJNtxAG+0625AhfmMdJgse/AMi9NKl Kbe0irMO8WkyDTddK1wGxaOHcgEamAZGnuOzSULwdED/GJ0YZ/qXU7jvLEaGD1uNqoqW bGiEMZXSVoHycdS1SOUfS53DzyfBxLEeQ+/SL2IGXcWNbjQjQ9xEXCvqwgjGnIvUFKXa swZw== X-Gm-Message-State: AOAM530NXuFPtAb8lWSRIX+UCDrPVGGPptVdbqlKVjZsa1hbRgmySiEV hfxC2W3YrmTWsyDBsOzl37x9qeDYIeUGo6P0 X-Google-Smtp-Source: ABdhPJzQMMLuFIx+PICiSM5fMdFoOD6BH/qxqdJPX2K4kk6be0m2ftFQWnJVjPoZyfoyxnqEykCmHQ== X-Received: by 2002:a17:90a:a101:: with SMTP id s1mr4073486pjp.220.1601391633174; Tue, 29 Sep 2020 08:00:33 -0700 (PDT) Received: from localhost ([2a0c:b641:69c:e9b8:1::1]) by smtp.gmail.com with ESMTPSA id 25sm5912921pfj.35.2020.09.29.08.00.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Sep 2020 08:00:32 -0700 (PDT) Date: Tue, 29 Sep 2020 22:59:58 +0800 From: lilydjwg To: Oliver Kiddle Cc: Bart Schaefer , Mikael Magnusson , Zsh hackers list Subject: Re: bad math expression error inside _pick_variant when running insert-all-matches for ls Message-ID: <20200929145958.GA2519178@lilyforest.localdomain> References: <20200928153930.GA2332142@lilyforest.localdomain> <43007-1601359815.927012@l4Ug.3FSk.dcnq> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43007-1601359815.927012@l4Ug.3FSk.dcnq> X-Seq: 47414 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 Tue, Sep 29, 2020 at 08:10:15AM +0200, Oliver Kiddle wrote: > Bart Schaefer wrote: > > I think the issue is that _insert_all_matches is expecting to be > > called as a completer from inside _main_complete, not as a standalone > > widget. > > Yes, I think you're right. > > > If we want _pick_variant to work in this context, we need PWS's patch, > > but there may be other oddities as well. Perhaps 20 years ago it was > > OK to call _complete directly like that, but it's not OK any longer. > > To create custom completion widgets that make use of the existing > compsys system, bind to _generic and set the completer style. > > zstyle ':completion:all-matches::::' completer _all_matches _complete > zstyle ':completion:all-matches:*' old-matches true > zstyle ':completion:all-matches:*' insert true > zstyle ':completion:all-matches:*' file-patterns \ > '%p:globbed-files' '*(-/):directories' '*:all-files' > zle -C all-matches complete-word _generic > bindkey '^Xx' all-matches > > _generic dates to June 2000, _all_matches October of that year and my > use of it, more-or-less like this, is the following year. I had zle -C > directly binding _history before that but, as indicated in a comment, it > was specifically designed to work either way. At some point I switched > to using it via _generic too and that's what I'd recommend now. Thanks! This code works without issues. But could zsh include such a functionality itself, so that users need only to bind a key when they want? This functionality helps me a lot, e.g. when removing system packages sharing the same prefix. BTW the mailing list archive seems not receiving any message after Aug 2. (I was trying to keep a reference to your message.) -- Best regards, lilydjwg