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 13464 invoked from network); 5 Jan 2022 20:32:57 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 5 Jan 2022 20:32:57 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1641414777; b=TsMvEiKLJsr/DTy4qaTXKlP+ZwsgYGWjqyGBI1FE7tIXmXHpg5jzngzWr1Xg2YWcGKw6CH/TPG qqMMqpHh3s8Sq0puIKbiPrYpaUn4sCixknDwuRuIxu2VUZIWMlER1ebKodJrKcfqSpbb63bPUu Fv4dA07SfdHluZ8lSLytqD+tH3xnaY525mw9LnifrtYX0UHk1VLIpvmPW50OYXlhWtN6PrBaeO 0iH3jaox9x4tF1RUPOFkaag3yCZNv+S37uiSKqVhetDRog+GtWypC6EBnxzXBBsaNd5BQujphf 4E4WhPU1ZsXPjIQbF02gEax3PqLbbpBPn3ZADIdi29qIrA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f182.google.com) smtp.remote-ip=209.85.219.182; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 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=1641414777; bh=VkAHZbe2g/QdC5w0pbkHCHNQbd9FYAaNxnL87BhPpbA=; 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=fwCXx26WgkFT6MM8x9UdH2KWnPQXOvJBy8eZ/tBTPoUp/oKdP1r5g2hJFWGXMTjGlDuc2MIqmh SyFFZYBXBoqQT6SHQ/ZUitiedCbakj3dNlo131je71zAAm986bZx9XqhLEKKWifS8E+lMwKYsU wFdrOQFKPT01QjTnoUXSrD4T7bwh/U9bWwPOPKYvfWAQSwsThNHF8NnQzSALkFWeifYeuYOpzl FKtzOiSL9HC58WBgHNcZpG6zQ9a+TBIHVNGGl236jirkffBfcGgZZUj/ZpyIzZaHEYqlmZEXZt JIHHfg1fwExLREcFJ9HJ/4nRtC9YTkV7bXdBrgweZ1cP2Q==; 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-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=DDBR/EOAp9TC4W4DelbXCPMahHMNBEbZNpqLvHkVP+E=; b=Sf/9BxQvb2YuEMcl/ddfEOp5Iw mkeBLhMzADYQlBGFn/fMl6CYi4Z8qFROh0GiH76FtOkkrdRvYEak8JpfciLb73wSFsn0XrYRfLy3b WgU3ODjTGMGWVEqKViCMbZIeqfJrgrxBIcSsMg4eG4uYQ0jPVz9AckLNgHWEo6wuV2j9CP5rkOu1r u/bAvYK8nfTUlIlPnWiHGBJDg7XC5E+lxC+qeavhEq36nVhy9TaU6U6hH6IrtiweLbFQ6JvQKOKBj 7jMnk4wY+4p/peKJdjffGXvosSHZyz2OoABvynOKe+QhJ51GgfT09+kQ1uzmjUuT492eJZzSPA/BX DACiFPfQ==; Received: from authenticated user by zero.zsh.org with local id 1n5Cxs-000EUT-W5; Wed, 05 Jan 2022 20:32:57 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f182.google.com) smtp.remote-ip=209.85.219.182; dkim=pass header.d=brasslantern-com.20210112.gappssmtp.com header.s=20210112 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-yb1-f182.google.com ([209.85.219.182]:43694) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1n5Cqo-000DN5-N7; Wed, 05 Jan 2022 20:25:39 +0000 Received: by mail-yb1-f182.google.com with SMTP id p15so1190527ybk.10 for ; Wed, 05 Jan 2022 12:25:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=DDBR/EOAp9TC4W4DelbXCPMahHMNBEbZNpqLvHkVP+E=; b=Tx//rHXB+RoDi11QuFOvEAfhhC742DaKHAKhU4Knzj0U0R2URQL2lhc4AQFsFjtwvJ ExP8YCvI776lFWoB9voHgNoa459dgwsX9rcw2F0Tf2RjhHRS/kihjQaLl9gDL9hOhbkK 5ucERKr/D4MybWWOsUVrWhVhR7blP0HMxA/ZExArL78rT9SiUowd/G0b1NDWK4+zyI7A UsMfx8UHRFRVIirOND9C43QqN4lGBOMv/lrccJdtJjxMjkGjNZTCO3/Ad3yj+yayIa/O r2B4B+OfpWlbIGuXW9Q3J6j9y5ipXfpX1fMMF8cRYFUQSsO/0kJO0l3oCLHG4glCqr2Q ogfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DDBR/EOAp9TC4W4DelbXCPMahHMNBEbZNpqLvHkVP+E=; b=6Pf8K1HSg8Tc9je1ebBZDoMCisq9iO5MJ6SND9DbA8Bd5JpW68llG0Awp8NJkHsrhT fAsm2NmfkfA+dhsz6kjS0roYrxV79Z2I20QZzsQGD1rklOak8M72qfSRWQH8P+xzjZ90 yyTL+ub8tLOfhmCdICobueiBkVyZCOCfM8R3OAlWBkZoj9Bh3bvkEYeptynxCCPuABbA ns3PEbwftFe2GU+JP8NSsycDzq/t4NE+UIO7hV/0pw7nw7hgYdVXMYIOFFFLL32MJykI PfAEeCfHHKg/qTe6/2qC/02N5hmG5dsu8w1crrCz2Fi4OBIabZNXTwJCOqx4RBd6xufx iKQA== X-Gm-Message-State: AOAM531A/HHm0ollxlIsRLirHj3DChqUMzA3az723HBJwTcymoGv2iZV K3Bceee4mmaFps41KLPvHpJwnO6Y3OYwlT/igZ6Dxo1su+qBxA== X-Google-Smtp-Source: ABdhPJyaCdmhvIet8JOwom4uyIQoMRvyB3WwxesDD2LRrR7GkqoTUauJUV9v7ICcycToqVdSN+ODLt2wiTBJE7ZpOwA= X-Received: by 2002:a25:4290:: with SMTP id p138mr59342240yba.45.1641414337761; Wed, 05 Jan 2022 12:25:37 -0800 (PST) MIME-Version: 1.0 References: <20220103123903.GA20434@polanet.pl> <20220105194643.GA13958@polanet.pl> <20220105201522.GA6768@polanet.pl> In-Reply-To: <20220105201522.GA6768@polanet.pl> From: Bart Schaefer Date: Wed, 5 Jan 2022 12:25:26 -0800 Message-ID: Subject: Re: _complete: insert unambiguous when globbing To: Tomasz Pala Cc: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 27453 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Wed, Jan 5, 2022 at 12:15 PM Tomasz Pala wrote: > > OK, this was pretty straightforward: > > if [[ $PREFIX = *'*'* ]]; then > compstate[pattern_insert]=not_menu > _eat_asterisk=true > elif [ "$_eat_asterisk" = 'true' ]; then > compstate[old_list]=keep > fi If the solution with the _match completer doesn't work for you, my suggestion for the above would be to use if [[ $PREFIX = *[*?\[\]]* ]]; then to cover more glob operators than just "*". > Having said that - does this behaviour deserve upstreaming with it's own > zstyle, or is it too hacky? I'd say you need to demonstrate how this differs from the insert-unambiguous style before we can make a determination.