1
0
Fork 0
mirror of synced 2024-11-26 17:25:35 -05:00

Fix zimfw clean-dumpfile when there's no matches

It fails with

    _zimfw_clean_dumpfile:4: no matches found: /path/to/.zcompdump(|.zwc(|.old))
This commit is contained in:
Eric Nielsen 2020-01-09 07:21:16 -05:00
parent 424526ebee
commit 28e4345653
No known key found for this signature in database
GPG key ID: 47D1DBFA0765A1FB
3 changed files with 4 additions and 3 deletions

View file

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Zsh 5.2 does not recognize the `:P` modifier. Replace it by `:A`. - Zsh 5.2 does not recognize the `:P` modifier. Replace it by `:A`.
- Also compile and clean .zprofile among the startup files. - Also compile and clean .zprofile among the startup files.
- Don't fail on `zimfw clean-dumpfile` when there's nothing to remove.
## [1.0.0] - 2020-01-07 ## [1.0.0] - 2020-01-07

View file

@ -2,6 +2,6 @@ _zimfw_clean_dumpfile() {
local zdumpfile zopt local zdumpfile zopt
zstyle -s ':zim:completion' dumpfile 'zdumpfile' || zdumpfile=<%= home %>/.zcompdump zstyle -s ':zim:completion' dumpfile 'zdumpfile' || zdumpfile=<%= home %>/.zcompdump
(( ! _zquiet )) && zopt='-v' (( ! _zquiet )) && zopt='-v'
command rm -f ${zopt} ${zdumpfile}(|.zwc(|.old)) || return 1 command rm -f ${zopt} ${zdumpfile}(|.zwc(|.old))(N) || return 1
_zimfw_print -P '<%= done %>Done with clean-dumpfile. Restart your terminal to dump an updated configuration.' _zimfw_print -P '<%= done %>Done with clean-dumpfile. Restart your terminal to dump an updated configuration.'
} }

View file

@ -249,7 +249,7 @@ _zimfw_clean_dumpfile() {
local zdumpfile zopt local zdumpfile zopt
zstyle -s ':zim:completion' dumpfile 'zdumpfile' || zdumpfile=${ZDOTDIR:-${HOME}}/.zcompdump zstyle -s ':zim:completion' dumpfile 'zdumpfile' || zdumpfile=${ZDOTDIR:-${HOME}}/.zcompdump
(( ! _zquiet )) && zopt='-v' (( ! _zquiet )) && zopt='-v'
command rm -f ${zopt} ${zdumpfile}(|.zwc(|.old)) || return 1 command rm -f ${zopt} ${zdumpfile}(|.zwc(|.old))(N) || return 1
_zimfw_print -P 'Done with clean-dumpfile. Restart your terminal to dump an updated configuration.' _zimfw_print -P 'Done with clean-dumpfile. Restart your terminal to dump an updated configuration.'
} }
@ -258,7 +258,7 @@ _zimfw_compile() {
} }
_zimfw_info() { _zimfw_info() {
print 'Zim version: 1.0.1-SNAPSHOT (previous commit is 2cc69d5)' print 'Zim version: 1.0.1-SNAPSHOT (previous commit is 424526e)'
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)