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=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23206 invoked from network); 11 Jun 2020 03:26:53 -0000 Received: from ns1.primenet.com.au (HELO primenet.com.au) (203.24.36.2) by inbox.vuxu.org with ESMTPUTF8; 11 Jun 2020 03:26:53 -0000 Received: (qmail 8975 invoked by alias); 11 Jun 2020 03:26:45 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24924 Received: (qmail 2912 invoked by uid 1010); 11 Jun 2020 03:26:45 -0000 X-Qmail-Scanner-Diagnostics: from mail-il1-f169.google.com by f.primenet.com.au (envelope-from <8fvebtoeq87@gmail.com>, uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.3/25835. spamassassin: 3.4.4. Clear:RC:0(209.85.166.169):SA:0(-1.7/5.0):. Processed in 1.190281 secs); 11 Jun 2020 03:26:45 -0000 X-Envelope-From: 8fvebtoeq87@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.169 as permitted sender) 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=Lbbld8Hzs3p2NZMBHPOrOUmzqzHNIg8YfpIrCWcyCQU=; b=pqkmabAfWwCVKuyjORDDpCb7O8K/t5/zMsHVXZEv3uF5m5GRKtnI8Ce1u46vtAZKLF eYtoREv9/2tE2vvlQX0jArMm5eXYC4G4meJwK0vnUt1BXPd57pqP0G43WY19NYdqJkJH u6Gx6GGQTtoQHXCbQNG+JaZ7UE2+yjUUc/o4j3RQ6W64X7V8VuHkfZqyValcGk1nyv+F V2VGZI/MFWm2Ro9D98OQMofpY5f3MyhgOO80EoGSs4kUXnk9b/AFOT12o9S3UWfdEVNY aVn305OO8UG4iji4nk1LomBnGiG2kGfl15DkVd9LhWSF+vakxoJE+knYtW58OU/PP0lL x18Q== X-Gm-Message-State: AOAM532X1P0GjX0nHoEbKiJfsaCucGlEIYyrzBuqsKGDuWGiClGrRF33 Hbvcj7cITBFQwTHF9HhLH63co0U1voQB/UbQGbxLAdT4 X-Google-Smtp-Source: ABdhPJzqL0niplV69mEqKJc79DOI2QI5Wa0kx6iG5l6SLORnZZ/kQgwFOHF7qWxR9GCz4P6JrzNO0W0ple2Yi1KfmD4= X-Received: by 2002:a92:5b99:: with SMTP id c25mr6258570ilg.42.1591845971437; Wed, 10 Jun 2020 20:26:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alan <8fvebtoeq87@gmail.com> Date: Wed, 10 Jun 2020 23:26:00 -0400 Message-ID: Subject: Re: menu-select doesn't respect COMPLETE_IN_WORD option To: Bart Schaefer Cc: Zsh Users Content-Type: multipart/alternative; boundary="000000000000aa2e9605a7c6850c" --000000000000aa2e9605a7c6850c Content-Type: text/plain; charset="UTF-8" Yes, I've tried *not* setting the complete_in_word option, but then the _prefix completer doesn't work. See this (rather bizarre in my opinion) explanation from http://zsh.sourceforge.net/Guide/zshguide06.html: "One gotcha with the _prefix completer: you have to make sure the option COMPLETE_IN_WORD is set. That may sound counter-intuitive: after all, _prefix forces completion *not* to complete inside a word. The point is that without that option, completion is only ever tried at the end of the word, so when you type in the middle of , the cursor is moved to after the end of the suffix before the completion system has a chance to see what's there, and hence the whole thing is regarded as a prefix, with no suffix." However, after reading that section on _prefix more carefully, I tried putting the _prefix completer further up in my completer list right after _expand (in ~/.zshrc) like so: zstyle ':completion:*' completer _expand _prefix _complete _ignored _prefix ...and now it works (mostly) the way I prefer! Namely, it acts like expand-or-complete-prefix and ignores the suffix, even if the suffix matches something. There is still some weirdness with slashes at the end of directories, so that I get double slashes sometimes when the suffix starts with a slash, but I suppose that's something I can live with. (I'm not actually entirely clear how the completer ordering works, so not sure if I need that second _prefix instance at the end, but whatever works I guess. If someone would care to shed some light on the matter, that would be good too.) On Wed, Jun 10, 2020 at 10:33 PM Bart Schaefer wrote: > On Tue, Jun 9, 2020 at 7:26 PM Alan <8fvebtoeq87@gmail.com> wrote: > > > > I found a partial solution by adding the _prefix completer (along with > the complete_in_word option). > > Have you tried NOT setting the complete_in_word option? > --000000000000aa2e9605a7c6850c--