Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Autocompletion doesn't work with kanji
- X-seq: zsh-users 14688
- From: "Benjamin R. Haskell" <zsh@xxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Autocompletion doesn't work with kanji
- Date: Tue, 22 Dec 2009 15:09:37 -0500 (EST)
- In-reply-to: <4B3107AB.1050003@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <4B30085F.2010505@xxxxxxxxxxxxxx> <alpine.LNX.2.01.0912220049480.25312@xxxxxxxxxxx> <091222013609.ZM4589@xxxxxxxxxxxxxxxxxxxxxx> <4B30D92C.6070502@xxxxxxxxxxxxxx> <091222082525.ZM5379@xxxxxxxxxxxxxxxxxxxxxx> <4B310188.6040506@xxxxxxxxxxxxxx> <alpine.LNX.2.01.0912221236100.17951@xxxxxxxxxxx> <4B3107AB.1050003@xxxxxxxxxxxxxx>
On Tue, 22 Dec 2009, Christoph Dittmann wrote:
> Benjamin R. Haskell wrote:
> > How about replacing the _last_try line with:
> > print -lr ${CURSOR:q:q} >&2
> >
> > It'll look ugly, but it's a quick check to see if something's amiss in
> > your $CURSOR variable.
>
> Ok, when I enter 'grep æ A<TAB>' (with the kanji character), it gives
> me 2 lines:
> $ grep æ A8
> A<cursor ends up here>
>
> However, without a kanji character it prints the following 3 lines:
> $ grep x A8
> grep x A<cursor is now here>
> A1 A2
>
>
> (Again, that's in a directory containing only the two files A1 A2.)
>
> If the $CURSOR variable is supposed to count characters and not bytes,
> it looks like it's doing that correctly, as it shows 8 in both cases.
Huh, I can finally reproduce Christoph's problem.
[ I really liked my "ISO-2022-JP contained a quote" theory. :-) ]
Running under zsh -x, w/ the same set up: in a directory containing only
A1 and A2, and a zstyle -e of the form:
zstyle -e ':completion:*' completer $'\nSOMETHING\nreply=(_files)'
After:
$ blah æ A<Tab>
If the SOMETHING contains certain references to $CURSOR, prefix contains
'AA' instead of 'A' (and CURSOR is advanced by one).
For various SOMETHINGs:
CURSOR=$CURSOR # doesn't break
print -lr $CURSOR >&2 # does break
_throwaway=$CURSOR # does break
I'm falling back to the usual suspect (_path_files).
Best,
Ben
Messages sorted by:
Reverse Date,
Date,
Thread,
Author