1
0
Fork 0
mirror of synced 2024-12-25 23:43:20 -05:00

Add .zprofile to the list of startup files

Zim does not use/modify .zprofile in it's templates. For completeness/
performance, the .zprofile should be compiled/cleaned if present.

Ref: http://zsh.sourceforge.net/Intro/intro_3.html

Closes #358
This commit is contained in:
Marko Kaznovac 2020-01-08 14:19:52 +01:00 committed by Eric Nielsen
parent 12a4bb6000
commit 2cc69d5d6f
No known key found for this signature in database
GPG key ID: 47D1DBFA0765A1FB
3 changed files with 5 additions and 4 deletions

View file

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Zsh 5.2 does not recognize the `:P` modifier. Replace it by `:A`.
- Also compile and clean .zprofile among the startup files.
## [1.0.0] - 2020-01-07

View file

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

View file

@ -77,7 +77,7 @@ _zimfw_build_login_init() {
fi
# Compile Zsh startup files
for zfile in \${1} \${ZDOTDIR:-\${HOME}}/.z(shenv|shrc|login|logout)(N-.); do
for zfile in \${1} \${ZDOTDIR:-\${HOME}}/.z(shenv|profile|shrc|login|logout)(N-.); do
zrecompile -p \${1} \${zfile} || return 1
done
@ -242,7 +242,7 @@ _zimfw_clean_compiled() {
local zopt
(( ! _zquiet )) && zopt='-v'
command find ${ZIM_HOME} \( -name '*.zwc' -o -name '*.zwc.old' \) -exec rm -f ${zopt} {} \; || return 1
command rm -f ${zopt} ${ZDOTDIR:-${HOME}}/.z(shenv|shrc|login|logout).zwc(|.old)(N) || return 1
command rm -f ${zopt} ${ZDOTDIR:-${HOME}}/.z(shenv|profile|shrc|login|logout).zwc(|.old)(N) || return 1
if (( ! _zquiet )); then
print -P 'Done with clean-compiled. Run %Bzimfw compile%b to re-compile.'
fi
@ -263,7 +263,7 @@ _zimfw_compile() {
}
_zimfw_info() {
print 'Zim version: 1.0.1-SNAPSHOT (previous commit is 0213f77)'
print 'Zim version: 1.0.1-SNAPSHOT (previous commit is 7374770)'
print -R 'ZIM_HOME: '${ZIM_HOME}
print -R 'Zsh version: '${ZSH_VERSION}
print -R 'System info: '$(command uname -a)