mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-27 14:20:07 +00:00
remove MULTIBYTE requirement from the configuration wizard (#2397)
This commit is contained in:
parent
9bb15e9ffb
commit
f851f41fc1
3 changed files with 10 additions and 6 deletions
13
README.md
13
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
|
||||
|
|
|
@ -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 }
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue