Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
<a href="https://translate.zshell.dev/" rel="noopener" target="_blank"><img align="center" src="https://badges.crowdin.net/e/f108c12713ee8526ac878d5671ad6e29/localized.svg" /></a>
<a href="https://github.com/z-shell/zi/releases" rel="noopener" target="_blank"><img align="center" src="https://img.shields.io/github/tag/z-shell/zi.svg" alt="Version" /></a>
<a href="https://github.com/z-shell/zi/blob/main/LICENSE" rel="noopener" target="_blank"><img align="center" src="https://img.shields.io/badge/License-MIT-blue.svg" alt="Project License" /></a>
<a thref="https://github.com/z-shell/zi-vim-syntax/" rel="noopener" target="_blank"><img align="center" src="https://img.shields.io/badge/--019733?logo=vim" alt="VIM" /></a>
<a href="https://github.com/z-shell/zi-vim-syntax/" rel="noopener" target="_blank"><img align="center" src="https://img.shields.io/badge/--019733?logo=vim" alt="VIM" /></a>
<a href="https://open.vscode.dev/z-shell/zi/" rel="noopener" target="_blank">
<img align="center" src="https://img.shields.io/badge/--007ACC?logo=visual%20studio%20code&logoColor=ffffff"alt="Visual Studio Code" />
</p></a>
<img align="center" src="https://img.shields.io/badge/--007ACC?logo=visual%20studio%20code&logoColor=ffffff" alt="Visual Studio Code" />
</a></p>
</div>
</tr>
</td>
Expand Down
13 changes: 7 additions & 6 deletions lib/zsh/autoload.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ ZI[EXTENDED_GLOB]=""

# Remove all compiled files
for rm_file ( ${ZI[BIN_DIR]}/**/*.zwc(DN) ) {
command rm -f -- ${rm_compiled} > /dev/null 2>&1
command rm -f -- "${rm_file}" > /dev/null 2>&1
}

# Recompile new ones
Expand Down Expand Up @@ -711,7 +711,7 @@ ZI[EXTENDED_GLOB]=""

if (( ! dry_run )); then
# Update the codebase
command git merge -n $opt --autostash --ff-only FETCH_HEAD || \
command git merge -n $opt --ff-only FETCH_HEAD || \
{ (( quiet )) || +zi-message "{mmdsh}{happy} Zi{rst} » {profile}update failed {quos}✘{rst}"; return 1 }
.zi-auto-reload $opt
fi
Expand Down Expand Up @@ -2962,7 +2962,8 @@ EOF
local compiled_at_ts="$(<${ZI[ZMODULES_DIR]}/zpmod/COMPILED_AT)"
[[ -e ${ZI[ZMODULES_DIR]}/zpmod/RECOMPILE_REQUEST ]] && \
local recompile_request_ts="$(<${ZI[ZMODULES_DIR]}/zpmod/RECOMPILE_REQUEST)"
if [[ ${recompile_request_ts:-1} -gt ${compiled_at_ts:-0} ]]; then
if [[ -e ${ZI[ZMODULES_DIR]}/zpmod/RECOMPILE_REQUEST ]] && \
[[ ${recompile_request_ts:-1} -gt ${compiled_at_ts:-0} ]]; then
+zi-message "{warn}Warning{warn}{ehi}:{rst} {lhi}recompilation{rst} of the {bcmd}zpmod{rst} module has been requested…"
(( ${+functions[.zi-confirm]} )) || builtin source "${ZI[BIN_DIR]}/lib/zsh/autoload.zsh" || return 1
.zi-confirm "Do you want to proceed?" || return 1
Expand Down Expand Up @@ -3010,9 +3011,9 @@ EOF
local cores=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || command getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
local build_log="${ZI[LOG_DIR]}/zpmod/${EPOCHSECONDS}-build.log"
command mkdir -p "${ZI[LOG_DIR]}/zpmod" 2>/dev/null
command make --jobs=$cores -C "${ZI[ZMODULES_DIR]}/zpmod" | command tee "$build_log" >/dev/null
if command make -C "${ZI[ZMODULES_DIR]}/zpmod" &>/dev/null; then
[[ -f Src/zi/zpmod.so ]] && command cp -vf Src/zi/zpmod.{so,bundle}
command make --jobs=$cores -C "${ZI[ZMODULES_DIR]}/zpmod" 2>&1 | command tee "$build_log" >/dev/null
if (( pipestatus[1] == 0 )); then
[[ -f Src/zi/zpmod.so ]] && command cp -vf Src/zi/zpmod.so Src/zi/zpmod.bundle
builtin print "$EPOCHSECONDS" >! "${ZI[ZMODULES_DIR]}/zpmod/COMPILED_AT"
+zi-message "{ok}-- Build successful! --{rst}"
+zi-message "{faint}-- Build log{ehi}:{rst} {file}$build_log{faint} --{rst}"
Expand Down
4 changes: 2 additions & 2 deletions zi.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ nocompile|reset"
ZI[cmd-list]="-V|--version|version|-h|--help|help|subcmds|icemods|analytics|man|self-update|times|zstatus|load|light|unload|\
snippet|ls|ice|update|status|report|delete|loaded|list|cd|create|edit|glance|stress|changes|recently|clist|completions|\
cclear|cdisable|cenable|creinstall|cuninstall|csearch|compinit|dtrace|dstart|dstop|dunload|dreport|dclear|compile|\
uncompile|compiled|cdlist|cdreplay|cdclear|srv|recall|env-whitelist|bindkeys|module|add-fpath|run|version"
uncompile|compiled|cdlist|cdreplay|cdclear|srv|recall|env-whitelist|bindkeys|module|add-fpath|run"

# Establish ZI[BIN_DIR]
[[ ! -e ${ZI[BIN_DIR]}/zi.zsh ]] && ZI[BIN_DIR]=
Expand Down Expand Up @@ -2870,7 +2870,7 @@ zicdclear() { .zi-compdef-clear -q; }
zicompinit() { builtin autoload -Uz compinit; compinit -d "${ZI[ZCOMPDUMP_PATH]}" "${(Q@)${(z@)ZI[COMPINIT_OPTS]}}"; }
# ]]]
# FUNCTION: zicompinit_fast. [[[
# Checks the cached .zcompdump file to see if it must be regenerated adds a noticable delay to zsh startup.
# Checks the cached .zcompdump file to see if it must be regenerated; adds a noticeable delay to zsh startup.
# This restricts checking it once a day, determines when to regenerate, as compinit doesn't always need to
# modify the compdump and compiles mapped to share (total mem reduction) run in background in multiple shells.
# A function that can be invoked from within `atinit', `atload', e.g: zi ice atinit'zicompinit_fast'.
Expand Down
Loading