1
0
Fork 0
mirror of synced 2024-12-12 16:35:44 -05:00

Fix _zimfw_build_login_init

Pattern must match from the beginning (`##`).
Also don't quote ${ZIM_HOME}. We don't want to have an array like
('${ZIM_HOME}' '/path/to/zim_home'), so it needs to be unquoted for the
uniqueness to work.
This commit is contained in:
Eric Nielsen 2020-07-04 14:59:37 -05:00
parent 9b02b41f47
commit 1e4d1e784d
No known key found for this signature in database
GPG key ID: 47D1DBFA0765A1FB
2 changed files with 5 additions and 3 deletions

View file

@ -1,5 +1,6 @@
_zimfw_build_login_init() {
local -Ur zscriptdirs=('${ZIM_HOME}' ${${_zdirs%%${ZIM_HOME}/*}:A})
# 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-.)")
local -r ztarget=${ZIM_HOME}/login_init.zsh
_zimfw_mv =(

View file

@ -65,7 +65,8 @@ _zimfw_build_init() {
}
_zimfw_build_login_init() {
local -Ur zscriptdirs=('${ZIM_HOME}' ${${_zdirs%%${ZIM_HOME}/*}:A})
# 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-.)")
local -r ztarget=${ZIM_HOME}/login_init.zsh
_zimfw_mv =(
@ -312,7 +313,7 @@ _zimfw_compile() {
}
_zimfw_info() {
print -R 'zimfw version: '${_zversion}' (previous commit is 1fd8961)'
print -R 'zimfw version: '${_zversion}' (previous commit is 9b02b41)'
print -R 'ZIM_HOME: '${ZIM_HOME}
print -R 'Zsh version: '${ZSH_VERSION}
print -R 'System info: '$(command uname -a)