1
0
Fork 0
mirror of synced 2024-11-26 09:15:34 -05:00

Zsh 5.2 does not recognize the :P modifier

It fails with

    _zimfw_build_init:8: unrecognized modifier `P'

The `:P` modifier was introduced in Zsh 5.3. Replace it by `:A`, as we
still want to keep compatibility with Zsh 5.2.

Fixes #349
This commit is contained in:
Eric Nielsen 2020-01-08 16:45:54 -05:00
parent 0213f77805
commit 12a4bb6000
No known key found for this signature in database
GPG key ID: 47D1DBFA0765A1FB
4 changed files with 8 additions and 7 deletions

View file

@ -7,7 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
_No unreleased changes_ ### Fixed
- Zsh 5.2 does not recognize the `:P` modifier. Replace it by `:A`.
## [1.0.0] - 2020-01-07 ## [1.0.0] - 2020-01-07

View file

@ -6,8 +6,8 @@ _zimfw_build_init() {
fi fi
_zimfw_mv =( _zimfw_mv =(
print -R "zimfw() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }" print -R "zimfw() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }"
(( ${#_zfpaths} )) && print -R 'fpath=('${_zfpaths:P}' ${fpath})' (( ${#_zfpaths} )) && print -R 'fpath=('${_zfpaths:A}' ${fpath})'
(( ${#_zfunctions} )) && print -R 'autoload -Uz '${_zfunctions} (( ${#_zfunctions} )) && print -R 'autoload -Uz '${_zfunctions}
print -Rn ${(F):-source ${^_zscripts:P}} print -Rn ${(F):-source ${^_zscripts:A}}
) ${ztarget} ) ${ztarget}
} }

View file

@ -6,7 +6,7 @@ class Zim
@home = "${ZDOTDIR:-${HOME}}" @home = "${ZDOTDIR:-${HOME}}"
@min_zsh_version = "5.2" @min_zsh_version = "5.2"
@startup_files_glob = ".z(shenv|shrc|login|logout)" @startup_files_glob = ".z(shenv|shrc|login|logout)"
@version = "1.0.0" @version = "1.0.1-SNAPSHOT"
@ellipsis = " ..." @ellipsis = " ..."
@okay = "%F{green})%f " @okay = "%F{green})%f "
@error = "x " @error = "x "

View file

@ -56,9 +56,9 @@ _zimfw_build_init() {
fi fi
_zimfw_mv =( _zimfw_mv =(
print -R "zimfw() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }" print -R "zimfw() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }"
(( ${#_zfpaths} )) && print -R 'fpath=('${_zfpaths:P}' ${fpath})' (( ${#_zfpaths} )) && print -R 'fpath=('${_zfpaths:A}' ${fpath})'
(( ${#_zfunctions} )) && print -R 'autoload -Uz '${_zfunctions} (( ${#_zfunctions} )) && print -R 'autoload -Uz '${_zfunctions}
print -Rn ${(F):-source ${^_zscripts:P}} print -Rn ${(F):-source ${^_zscripts:A}}
) ${ztarget} ) ${ztarget}
} }
@ -263,7 +263,7 @@ _zimfw_compile() {
} }
_zimfw_info() { _zimfw_info() {
print 'Zim version: 1.0.0 (previous commit is edee218)' print 'Zim version: 1.0.1-SNAPSHOT (previous commit is 0213f77)'
print -R 'ZIM_HOME: '${ZIM_HOME} print -R 'ZIM_HOME: '${ZIM_HOME}
print -R 'Zsh version: '${ZSH_VERSION} print -R 'Zsh version: '${ZSH_VERSION}
print -R 'System info: '$(command uname -a) print -R 'System info: '$(command uname -a)