From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20245 invoked by alias); 26 Jul 2015 22:29:58 -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: 35923 Received: (qmail 13978 invoked from network); 26 Jul 2015 22:29:56 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=RZLQ1JKPernui9a1/w6LeOInrXMQvdY5DxwjnLnXLXY=; b=qfZ+9vhpleMvzacu0pXvqLNJ69Tt4unashK455RSShIAK19im6sVLvPoLyGl5Vrp4N W2VVi0ewsej0R9IVSx3Fo20NOSmkvOx+wnjaz6+M+Zu+35jxLfW2GWtZdgurdfqcr/CG 2HWr37lj72SR40XHLZffe1UAtUwC3sN4cnVDPjVxHekjnxp2eqWs3QdvLa5XXDP2SMNH v9PjVDalgOQMmluK6d5OEBd38slzRhsThormVX0CspbwZZmuw8Uv9xbaCA2t7EfTouIT ILTkYzbO8JML+5TMk3BZuFs+wS1dx8fBRtNDXpNp0TWHqtTLuy1yrq9c0DMemyqc1aKq g6KA== MIME-Version: 1.0 X-Received: by 10.50.59.242 with SMTP id c18mr12613012igr.66.1437949792456; Sun, 26 Jul 2015 15:29:52 -0700 (PDT) In-Reply-To: <150726144146.ZM9170@torch.brasslantern.com> References: <20150724214952.GA15359@zira.vinc17.org> <10638.1437778219@thecus.kiddle.eu> <150724163126.ZM20996@torch.brasslantern.com> <12308.1437813031@thecus.kiddle.eu> <20150726211049.GF11938@zira.vinc17.org> <150726144146.ZM9170@torch.brasslantern.com> Date: Mon, 27 Jul 2015 00:29:52 +0200 Message-ID: Subject: Re: X font completion is buggy From: Mikael Magnusson To: Bart Schaefer Cc: zsh workers Content-Type: text/plain; charset=UTF-8 On Sun, Jul 26, 2015 at 11:41 PM, Bart Schaefer wrote: > On Jul 26, 11:10pm, Vincent Lefevre wrote: > } > } $ xterm -fn -adobe-helvetica-bold--n--0-0-0-0-p-0-iso8859-[] > } > } but the cursor shouldn't be at the end because after "bold-", > } there should be i, o or r. If I type [TAB], I get: > > If you look at this list, there are three different ways to disambiguate: > > } -adobe-helvetica-bold-i-normal--0-0-0-0-p-0-iso8859-1 > } -adobe-helvetica-bold-i-normal--0-0-0-0-p-0-iso8859-2 > } -adobe-helvetica-bold-i-normal--0-0-0-0-p-0-iso8859-15 > } -adobe-helvetica-bold-o-narrow--0-0-0-0-p-0-iso8859-1 > } -adobe-helvetica-bold-o-narrow--0-0-0-0-p-0-iso8859-2 > } -adobe-helvetica-bold-o-narrow--0-0-0-0-p-0-iso8859-15 > } -adobe-helvetica-bold-o-normal--0-0-0-0-p-0-iso8859-1 > } -adobe-helvetica-bold-o-normal--0-0-0-0-p-0-iso8859-2 > } -adobe-helvetica-bold-o-normal--0-0-0-0-p-0-iso8859-15 > } -adobe-helvetica-bold-r-narrow--0-0-0-0-p-0-iso8859-1 > } -adobe-helvetica-bold-r-narrow--0-0-0-0-p-0-iso8859-2 > } -adobe-helvetica-bold-r-narrow--0-0-0-0-p-0-iso8859-15 > } -adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-1 > } -adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-2 > } -adobe-helvetica-bold-r-normal--0-0-0-0-p-0-iso8859-15 > > You can add i/o/r after "bold-" to choose to one of the font styles, > or you can type a/o after "n" to choose the width, or you can type > 1 or 2 after "59-" to narrow the character sets. > > I believe completion always chooses the point of disambiguation with > the longest common prefix (common to the partial completions, not > common to the full list of matches). If you then type "2" and hit > TAB, that's no longer ambiguous so the cursor moves back to the "n" > because that is still ambiguous, and then if you type "o" and hit > TAB it moves back yet again. > > I think you'll find completion always behaves this way, but it's not > usually the case to have this many positions of ambiguity. The way mine is set up, zsh only ever inserts the unambiguous prefix on the command line and asks me for the disambiguation at that point, and never puts the cursor in the middle. I find this to be much less confusing overall. -- Mikael Magnusson