Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: X font completion is buggy



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.



Messages sorted by: Reverse Date, Date, Thread, Author