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

Re: getquery() acts funny with multibyte characters



2008/6/26 Mikael Magnusson <mikachu@xxxxxxxxx>:
> If you misspell a command or run rm * (there are probably other cases
> too) you get a prompt that asks you for y/n or whatever is applicable.
> If you write a multibyte character at this prompt, zsh will erase a
> character of the prompt for every extra byte in the character, ie
> entering å (U+E5) erases one character and entering は (U+306F) erases
> two. It seems to happen with unsetopt multibyte too.
>
> The function seems to emit "\b \b" to erase what you wrote if it isn't
> a valid response, which seems a bit strange. Wouldn't it be more sane
> to turn off echoing and simply print the valid response instead?

The current approach is also racey if you type very quickly (and by
type i mean have 1000 * 'b' in the x clipboard and press the middle
mouse button).

% mpalyer
zsh: correct 'mpalyer' to 'mplayer' [nyae]?
bbbbbbbbbbbbbbbbbbbbbbbzsh: command not found: mpalyer

-- 
Mikael Magnusson


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