Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
getquery() acts funny with multibyte characters
- X-seq: zsh-workers 25245
- From: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- To: zsh-workers <zsh-workers@xxxxxxxxxx>
- Subject: getquery() acts funny with multibyte characters
- Date: Thu, 26 Jun 2008 11:45:02 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=7Plv9e9JMsHGy6nZvd44mgsF71gMhH4edG+wHVptz70=; b=JVe6FN8iPRz6QzGSvUMKaQcpxWPTxA3ELmnAdVMf/DleP+O6Iq2aLKG7d/FLDUcYEV YimjP5SFbsYdArI1Wr9wY/6fAmKwIqrMqWyKTWMdr1WhD+0lw8vK+739SKJ18aAxN7B3 34WigCTZou/fRMy/GEbXY1wRLZi9fhQFFBm3Q=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=EgjDfvufP+92SN3xxOUpmPo+gvT4UcymSgkcvCws0Sj3Jp5AavtPytj5y7WnJjMWbz t/huHA1rB8Hg6sXj8nMKbI3fbBdviJCcX2eEXIdQA8U0akQ3scbWyatiPNSimPEYxhxt wO+PgCbFq/yvBCHMgIZIrosgHqyy/UP0qTFE0=
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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?
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author