Upstream changed surrounding lines again. Here is an updated zimfw.zsh.patch
.
--- zimfw.zsh 2021-09-21 16:26:34.034179638 +1000
+++ zimfw.zsh 2021-09-21 16:30:58.546504098 +1000
@@ -53,10 +53,6 @@
_zimfw_build_init() {
local -r ztarget=${ZIM_HOME}/init.zsh
- # Force update of init.zsh if it's older than .zimrc
- if [[ ${ztarget} -ot ${ZDOTDIR:-${HOME}}/.zimrc ]]; then
- command mv -f ${ztarget}{,.old} || return 1
- fi
_zimfw_mv =(
print -R "zimfw() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }"
print -R "zmodule() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }"
@@ -65,16 +61,13 @@
if (( ${#_zfunctions} )) print -R 'autoload -Uz '${_zfunctions#${~zpre}}
print -R ${(F)_zcmds#${~zpre}}
) ${ztarget}
+ chmod -R u+rX,g+rX,o+rX "${ZIM_HOME}" &>/dev/null
}
_zimfw_build_login_init() {
# Array with unique dirs. ${ZIM_HOME} or any subdirectory should only occur once.
local -Ur zscriptdirs=(${ZIM_HOME} ${${_zdirs##${ZIM_HOME}/*}:A})
local -r zscriptglob=("${^zscriptdirs[@]}/(^*test*/)#*.zsh(|-theme)(N-.)") ztarget=${ZIM_HOME}/login_init.zsh
- # Force update of login_init.zsh if it's older than .zimrc
- if [[ ${ztarget} -ot ${ZDOTDIR:-${HOME}}/.zimrc ]]; then
- command mv -f ${ztarget}{,.old} || return 1
- fi
_zimfw_mv =(
print -Rn "() {
setopt LOCAL_OPTIONS CASE_GLOB EXTENDED_GLOB
@@ -101,6 +94,7 @@
} \"\${@}\"
"
) ${ztarget}
+ chmod -R u+rX,g+rX,o+rX "${ZIM_HOME}" &>/dev/null
}
_zimfw_build() {
Pinned Comments
carbolymer commented on 2021-01-11 21:41 (UTC) (edited on 2021-01-22 07:46 (UTC) by carbolymer)
Ugh, it was a PITA to create this package. Please note that errors are silenced, so if you have any issues with zim, remove
&>/dev/null
from your/etc/zshrc
- https://aur.archlinux.org/cgit/aur.git/tree/zshrc?h=zsh-zim-git&id=5a378e94d516c57d39629de545b78b0f020d86a4I had to do it this way:
$ZIM_HOME
is only writable by root and zim constantly tries to update & recompile itself (=write to$ZIM_HOME
), which results in permission errors when starting zsh as a normal user.If you want to add/remove a module:
zmodule
in/etc/zsh/zimrc
zimfw install && zsh