aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Perepelitsa <roman.perepelitsa@gmail.com>2023-07-29 18:01:40 +0300
committerRoman Perepelitsa <roman.perepelitsa@gmail.com>2023-07-29 18:01:40 +0300
commitf851f41fc14d5bd66266b4b4af917d50c1c8b7fe (patch)
tree6f572f06c598fb27d35eb7f3177c6e6005a76993
parent9bb15e9ffbf43663a77949ea31d6f18c74e8981c (diff)
remove MULTIBYTE requirement from the configuration wizard (#2397)
-rw-r--r--README.md13
-rw-r--r--internal/configure.zsh1
-rw-r--r--internal/wizard.zsh2
3 files changed, 10 insertions, 6 deletions
diff --git a/README.md b/README.md
index 5fa806c6..f819c204 100644
--- a/README.md
+++ b/README.md
@@ -1696,10 +1696,15 @@ and make sure that `TERM` environment variable is set correctly. Verify with
If there is no UTF-8 locale on the system, configuration wizard won't offer prompt styles that use
Unicode characters. *Fix*: Install a UTF-8 locale. Verify with `locale -a`.
-When a UTF-8 locale is available, the first few questions asked by the configuration wizard assess
-capabilities of the terminal font. If your answers indicate that some glyphs don't render correctly,
-configuration wizard won't offer prompt styles that use them. *Fix*: Restart your terminal and
-install [the recommended font](#meslo-nerd-font-patched-for-powerlevel10k). Verify by running
+Another case in which configuration wizard may not offer Unicode prompt styles is when the
+`MULTIBYTE` shell option is disabled. *Fix*: Enable the `MULTIBYTE` option, or rather don't disable
+it (this option is enabled in Zsh by default). Verify with `print -r -- ${options[MULTIBYTE]}`.
+
+When `MULTIBYTE` is enabled and a UTF-8 locale is available, the first few questions asked by the
+configuration wizard assess capabilities of the terminal font. If your answers indicate that some
+glyphs don't render correctly, configuration wizard won't offer prompt styles that use them. *Fix*:
+Restart your terminal and install
+[the recommended font](#meslo-nerd-font-patched-for-powerlevel10k). Verify by running
`p10k configure` and checking that all glyphs render correctly.
### Cannot install the recommended font
diff --git a/internal/configure.zsh b/internal/configure.zsh
index 3e880f23..0e13bdec 100644
--- a/internal/configure.zsh
+++ b/internal/configure.zsh
@@ -18,7 +18,6 @@ function _p9k_can_configure() {
typeset -g __p9k_cfg_path=${__p9k_cfg_path_o:A}
typeset -g __p9k_cfg_path_u=${${${(q)__p9k_cfg_path_o}/#(#b)${(q)HOME}(|\/*)/'~'$match[1]}//\%/%%}
{
- [[ -o multibyte ]] || { $0_error "multibyte option is not set"; return 1 }
[[ -e $__p9k_zd ]] || { $0_error "$__p9k_zd_u does not exist"; return 1 }
[[ -d $__p9k_zd ]] || { $0_error "$__p9k_zd_u is not a directory"; return 1 }
[[ ! -d $__p9k_cfg_path ]] || { $0_error "$__p9k_cfg_path_u is a directory"; return 1 }
diff --git a/internal/wizard.zsh b/internal/wizard.zsh
index 87c45378..c7a03844 100644
--- a/internal/wizard.zsh
+++ b/internal/wizard.zsh
@@ -2107,7 +2107,7 @@ while true; do
unset pure_use_rprompt
- if [[ $TERM != (dumb|linux) && $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then
+ if [[ -o multibyte && $TERM != (dumb|linux) && $langinfo[CODESET] == (utf|UTF)(-|)8 ]]; then
ask_font || continue
ask_diamond || continue
if [[ $AWESOME_GLYPHS_LOADED == 1 ]]; then