1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-08 12:01:21 +02:00

unposted: FAQ updates.

Typo from previous change; also update old notes on
multibyte support.
This commit is contained in:
Peter Stephenson 2019-07-09 09:22:01 +01:00
parent cf66eb7adb
commit bbcfdffbc3
2 changed files with 28 additions and 22 deletions

View file

@ -1,3 +1,8 @@
2019-07-09 Peter Stephenson <p.stephenson@samsung.com>
* unposted: Etc/FAQ.yo: typo. also updates to outdated notes on
multibyte support.
2019-07-08 Bart Schaefer <schaefer@brasslantern.com> 2019-07-08 Bart Schaefer <schaefer@brasslantern.com>
* 43755: Functions/Zle/smart-insert-last-word: (Belated commit) * 43755: Functions/Zle/smart-insert-last-word: (Belated commit)

View file

@ -2023,7 +2023,7 @@ sect(Why doesn't the expansion mytt(*.{tex,aux,pdf}) do what I expect?)
echo *.(tex|aux|pdf) echo *.(tex|aux|pdf)
) )
This is now a pattern matching expression, so is considered as a This is now a pattern matching expression, so is considered as a
single pattern. Now any file that exists will supress the single pattern. Now any file that exists will suppress the
mytt(NOMATCH) behaviour, but you'll still get all the files that do mytt(NOMATCH) behaviour, but you'll still get all the files that do
match. match.
@ -2263,22 +2263,21 @@ sect(How does zsh handle multibyte input and output?)
cause all sorts of odd effects. (It was possible to edit in zsh using cause all sorts of odd effects. (It was possible to edit in zsh using
single-byte extensions of ASCII such as the ISO 8859 family, however.) single-byte extensions of ASCII such as the ISO 8859 family, however.)
From version 4.3.4, multibyte input is handled in the line editor if zsh From version 4.3.4 (stable versions starting from 5.0), multibyte
has been compiled with the appropriate definitions, and is automatically input is handled in the line editor if zsh has been compiled with the
activated. This is indicated by the option tt(MULTIBYTE), which is appropriate definitions, and is automatically activated. This is
set by default on shells that support multibyte mode. Hence you indicated by the option tt(MULTIBYTE), which is set by default on
can test this with a standard option test: `tt([[ -o multibyte ]])'. shells that support multibyte mode. Hence you can test this with a
standard option test: `tt([[ -o multibyte ]])'.
The tt(MULTIBYTE) option affects the entire shell: parameter expansion, The tt(MULTIBYTE) option affects the entire shell: parameter expansion,
pattern matching, etc. count valid multibyte character strings as a pattern matching, etc. count valid multibyte character strings as a
single character. You can unset the option locally in a function to single character. You can unset the option locally in a function to
revert to single-byte operation. revert to single-byte operation.
Note that if the shell is emulating a Bourne shell the tt(MULTIBYTE) As multibyte characters are nowadays standard across most utilities,
option is unset by default. This allows various POSIX modes to since 5.1 the tt(MULTBYTE) option has been turned on when emulating
work normally (POSIX does not deal with multibyte characters). If other shells.
you use a "sh" or "ksh" emulation interactively you should probably
set the tt(MULTIBYTE) option.
The other option that affects multibyte support is tt(COMBINING_CHARS), The other option that affects multibyte support is tt(COMBINING_CHARS),
new in version 4.3.9. When this is set, any zero-length punctuation new in version 4.3.9. When this is set, any zero-length punctuation
@ -2311,17 +2310,19 @@ sect(How do I ensure multibyte input and output work on my system?)
itemization( itemization(
it() The locale. This describes a whole series of features specific it() The locale. This describes a whole series of features specific
to countries or regions of which the character set is one. Usually to countries or regions of which the character set is one.
it is controlled by the environment variable tt(LANG) (there are Usually it is controlled by the environment variable tt(LANG)
others but this is the one to start with). You need to find a (there are others but this is the one to start with). If you have
locale whose name contains mytt(UTF-8). This will be a variant on a recent operating system, very likely it is already set
your usual locale, which typically indicates the language and appropriately. Otherwise, you need to find a locale whose name
country; for example, mine is mytt(en_GB.UTF-8). Luckily, zsh can contains mytt(UTF-8). This will be a variant on your usual
complete locale names, so if you have the new completion system locale, which typically indicates the language and country; for
loaded you can type mytt(export LANG=) and attempt to complete a example, mine is mytt(en_GB.UTF-8). Luckily, zsh can complete
suitable locale. It's the locale that tells the shell to expect the locale names, so if you have the new completion system loaded you
right form of multibyte input. (However, there's no guarantee that can type mytt(export LANG=) and attempt to complete a suitable
the shell is actually going to get this input: for example, if you locale. It's the locale that tells the shell to expect the right
form of multibyte input. (However, there's no guarantee that the
shell is actually going to get this input: for example, if you
edit file names that have been created using a different character edit file names that have been created using a different character
set it won't work properly.) set it won't work properly.)
it() The terminal emulator. Those that are supplied with a recent it() The terminal emulator. Those that are supplied with a recent