mirror of
https://github.com/zdharma-continuum/zinit.git
synced 2026-09-10 07:36:38 -04:00
Uplift the {bar}/{th-bar} code, i.a.: add a non-UTF8 fallback character.
This commit is contained in:
parent
39abb744d6
commit
33b0000675
14
zinit.zsh
14
zinit.zsh
|
|
@ -1902,12 +1902,22 @@ builtin setopt noaliases
|
|||
# ]]]
|
||||
# FUNCTION: .zinit-formatter-bar. [[[
|
||||
.zinit-formatter-bar() {
|
||||
REPLY=$ZINIT[col-bar]${(l:COLUMNS-1::─:):-}$ZINIT[col-rst]
|
||||
.zinit-formatter-bar-util ─ bar
|
||||
}
|
||||
# ]]]
|
||||
# FUNCTION: .zinit-formatter-th-bar. [[[
|
||||
.zinit-formatter-th-bar() {
|
||||
REPLY=$ZINIT[col-th-bar]${(l:COLUMNS-1::━:):-}$ZINIT[col-rst]
|
||||
.zinit-formatter-bar-util ━ th-bar
|
||||
}
|
||||
# FUNCTION: .zinit-formatter-bar-util. [[[
|
||||
.zinit-formatter-bar-util() {
|
||||
if [[ $LANG == (#i)*utf-8* ]]; then
|
||||
ch=$1
|
||||
else
|
||||
ch=-
|
||||
fi
|
||||
|
||||
REPLY=$ZINIT[col-$2]${(pl:COLUMNS-1::$ch:):-}$ZINIT[col-rst]
|
||||
}
|
||||
# ]]]
|
||||
# FUNCTION: .zinit-formatter-url. [[[
|
||||
|
|
|
|||
Loading…
Reference in a new issue