summaryrefslogtreecommitdiffstats
path: root/Completion/Linux/Command/_sshfs
diff options
context:
space:
mode:
authorMikael Magnusson <mikachu@gmail.com>2026-06-07 01:48:20 +0200
committerMikael Magnusson <mikachu@gmail.com>2026-06-14 01:56:15 +0200
commite5f58a80ba5124735d6434845ea382a5db1f1875 (patch)
tree0554fe54d4dcd9003b7d96fb5bd083e000c52d5a /Completion/Linux/Command/_sshfs
parent54677: tests: improve readability (diff)
downloadzsh-e5f58a80ba5124735d6434845ea382a5db1f1875.tar
zsh-e5f58a80ba5124735d6434845ea382a5db1f1875.tar.gz
zsh-e5f58a80ba5124735d6434845ea382a5db1f1875.tar.bz2
zsh-e5f58a80ba5124735d6434845ea382a5db1f1875.tar.lz
zsh-e5f58a80ba5124735d6434845ea382a5db1f1875.tar.xz
zsh-e5f58a80ba5124735d6434845ea382a5db1f1875.tar.zst
zsh-e5f58a80ba5124735d6434845ea382a5db1f1875.zip
54710: handle multibyte arguments in error messages
A lot of places check option strings char by char, then send that char to zwarn/zerr, instead of reading out the full multibyte character. Doing so is quite easy with unmeta_one in most cases, so just go ahead and do that. The print functions in fact expect a wchar_t for %c anyway. Also renames "unknown option" to "bad option" because that's what every other place calls it (also one place was missing the colon, added that). To reproduce the math errors, since it's slightly less obvious (you need a multibyte character that is also an invalid parameter name, otherwise it actually works fine) % zsh -c '(( ¯ ))' zsh:1: bad math expression: illegal character: ^ % zsh -c 'zmodload zsh/mathfunc; (( sin(1¯) ))' zsh:1: bad math expression: illegal character: ^ % zsh -c 'の=5; echo $(( の ))' # unchanged because it is working 5 Also adds some tests because B12 was looking very empty, not sure if this is the correct way to handle the intersection of possibly not compiled module with possibly not available UTF-8 locale, but X02 and some others do a similar thing with ZSH_TEST_LANG, though in those cases that's handled specially by comptest, not the test itself.
Diffstat (limited to 'Completion/Linux/Command/_sshfs')
0 files changed, 0 insertions, 0 deletions