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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 31252 invoked from network); 22 Apr 2022 11:06:37 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 22 Apr 2022 11:06:37 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1650625597; b=HlhMOSJmQ4WhKviixA3IsXKxmLX5LyR/hKcqoq93DYKoMwQ6HOPFTdZj3/cQP4AbZa1l9MPutH IPE9/GZH+ys0TTMlqTOExccpTODK7tRhuVwbfbdK+Tt0PBF/4MV8qMNEic5Zy6J+5huHFJP8NF oKbiwYxacAp7FGcNzpcRIegIj1bwsQHQdsaerqlwlOpuzqr3H133vFyB+TOMUdusNmMG0ziQJq rVZrWK7MhWSexorKhdPCtj5/feFiHMKREJjPCkDh1JE+08/SagoCohu/E29ew2tRhddXMZk6Im Z9kv4PKp7dL3HBmAdOfrgW7kGMj/WNj/ng8EFV3sxChN6w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-pf1-f177.google.com) smtp.remote-ip=209.85.210.177; dkim=pass header.d=gmail.com header.s=20210112 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-20210803; t=1650625597; bh=Yz0WgjeXy+D28sHqOquh3F33V1L9TILpEGIMqiygvVw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Cc:To:Subject: Message-ID:Date:From:References:In-Reply-To:MIME-Version:DKIM-Signature: DKIM-Signature; b=RV1wVV09Sf55Ltcupu3ZPDcPnFYqh8Kg/UKa1S3BerSb66TFvTDZzFKkfJNBvKbe/NEafyVUpZ Tl5bJ0jpGIzrEL2SGYXi4dLk7FGPfBgWwHqFIzir8Hlc1oVCvzaNHXaRqUtZUMNorImyk4dmKl SSsTiLueVPR1xDKvEmL2jbKBzLlIQfxgACEy7GW6fSM6ziLEA6MJyLNwh7oqyEt+6I2ucfbhzw gfUBqrfN2kHm6v4J8nRBMoZ6eA0wzXZ4ySrbNFZ3fC7yiJdBYWLxXBNrh2gVRJyJiA+JDzwi+3 ty8gRTWR9N3mpXivL1hmpJ7m1A/PW+RhS493QqhfHIYnSQ==; 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:Cc:To:Subject:Message-ID:Date:From:References:In-Reply-To: MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=eBLAM4nBZtIf2oAeANUqqGjZSsKHpuynPbrsKDi504s=; b=DeE+bofJq7QFYDtGMYk/KA0pDO dbx4adwpvbUOqgvb8BJi8BzT/fWJsR8i02UpyZ2XWlkbNQaDoYu/jhmcXg2AXY0fn/OWzHma2Y3Yg Khk9SfgxZ8mRPa9hlO8TgKENNUKrJm58Fp2uQngqv6H2SH6mi0iGogv5TmlimqLu6HmsQ9eDuEiyo Zws98gGOE1SeQBwkozUAmM89qzRbBdbVtzhQ+PgkUDlW5+mDWShSmVJH9dDUxdVcwlGD41KvyGw0c GVSV2nUc1c+mtAEMIlvpaEeN7yhih1h/9V+oWHV0PLdgkv/exIci0om28obAIPwznL1rtXSoNP1jR IENONjmg==; Received: from authenticated user by zero.zsh.org with local id 1nhr7T-000ENH-Gd; Fri, 22 Apr 2022 11:06:35 +0000 Authentication-Results: zsh.org; iprev=pass (mail-pf1-f177.google.com) smtp.remote-ip=209.85.210.177; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-pf1-f177.google.com ([209.85.210.177]:38841) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1nhr6p-000Dfg-J3; Fri, 22 Apr 2022 11:05:56 +0000 Received: by mail-pf1-f177.google.com with SMTP id b15so7693200pfm.5 for ; Fri, 22 Apr 2022 04:05:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=eBLAM4nBZtIf2oAeANUqqGjZSsKHpuynPbrsKDi504s=; b=YXANI5bxNafnLsLxdUoRuhsuRizYip0WBi0uiYfqMEcD1h7HDBBzC+n2plBqZOVEsE OFhLlk/PIGQihNWhmRczMIKJC+K3IFcoKozBqrFFdYl/A+vZgNHjinV82Pb7tvCHdhJ6 ECXhCH3QtAQr64hKyRBi9rHKfIkZUzAeoAsHpAlW70xCCN04mATv3eRFnzz0N9DhtKyB I078DuDiJJWo1ephGCbm64qBoimDSwR2+cZTu2St43lKWD+7rAELoM6q9p99QY0mBHR2 iiDvEqfK7yINhZF1516MFWCAw1XRoyqs45K4qE9AShtdeIenXB7moJ7XWDhcQ4hBmqj4 4BAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=eBLAM4nBZtIf2oAeANUqqGjZSsKHpuynPbrsKDi504s=; b=eRUlEyeZZTYnYFrLNOFiEhqg5uefMRRucg3fC6pTo2X4Fu5YXqzuGiu9N4QYo+zzcW 3qGe9TyTyN9Yr3a9PXA+MqCnBhfhCvdyfT4euV232U2bEhttBtg/cNyfedM2A2W6cFTv DaTuL8/h87wj0QmGm2mavzGmf+A2RGcYGRZRekoplXLVmah3fYGRKyfkjt3WO/DaIJ8f i7Azxpd/E2bbBGyNt27zrs0zGwyQFXOgr62T90rFsKCQozCOc0SRZTaOzowm+NrPaPeB QVFTOHrKsF+qJsXfwuI5t8zHYNKGstSFiYujyHmhf7Tqr0XTWEUc2kLXzfXUI7p3tqW6 sZig== X-Gm-Message-State: AOAM533kw82iAouSeOB6Ha0SKQnVov/cpXLVpNeWE0lS7Kg8me7QvWre A2oH5YwGOeQRgOg2Gx8f9hN2vtPZ41sqX69PzdTku+z7 X-Google-Smtp-Source: ABdhPJy9o1NJe64qcuAFGs+p//yXLyOsKqngSBdCae/Gzwcir+vMCxNiaNTKvOfcs8myu9ayVnQYq1RAmgRRMdZG+UQ= X-Received: by 2002:a63:5847:0:b0:399:3452:ffe4 with SMTP id i7-20020a635847000000b003993452ffe4mr3487111pgm.406.1650625554271; Fri, 22 Apr 2022 04:05:54 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:6a10:d5a5:0:0:0:0 with HTTP; Fri, 22 Apr 2022 04:05:53 -0700 (PDT) In-Reply-To: References: From: Mikael Magnusson Date: Fri, 22 Apr 2022 13:05:53 +0200 Message-ID: Subject: Re: How to accept a particular directory during directory selection for further tab completion To: zzapper Cc: Zsh-Users List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 27692 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 4/22/22, zzapper wrote: > Hi > > cd aa > > aaa/ aab/ aac/ > > > I want to accept aab/ then carry on completing > > > I do this by manually deleting and then retyping the trailing slash. > > But I guess there is an official way to do this? If you press a key bound to accept-and-infer-next-history during menu selection, then it will be accepted and menu selection will be automatically started again. There is no such key bound by default but you can do bindkey -M menuselect whateverkey accept-and-infer-next-history manpage entry: accept-and-infer-next-history accepts the current match and then tries completion with menu selec=E2= =80=90 tion again; in the case of files this allows one to select a direc=E2= =80=90 tory and immediately attempt to complete files in it; if there are no matches, a message is shown and one can use undo to go back to comple=E2= =80=90 tion on the previous level, every other key leaves menu selection (including the other zle functions which are otherwise special during menu selection) relatedly, accept-and-hold (or accept-and-menu-complete, they do the same thing here) is also useful: accept-and-hold, accept-and-menu-complete accept the currently inserted match and continue selection allowing to select the next match to insert into the line If you press this while several levels deep, you will insert one of the matches to the command line, and stay in the same directory in menu selection so you don't have to navigate back there to insert the next file you want (or slightly more optimally, copy-earlier-word and erase to last slash) --=20 Mikael Magnusson