Compare commits

..

5 commits

Author SHA1 Message Date
7eb8ac0772
[zsh] Don't time every custom script. 2021-05-14 10:05:35 +02:00
32c6c80622
Merge branch 'dmitmel-master' 2021-05-14 10:02:36 +02:00
d2cbad6967
Merge pull request #255 from dmitmel/master 2021-05-14 10:02:18 +02:00
Dmytro Meleshko
39c393822d [zsh] load zplg from the main entry script 2021-05-11 10:58:41 +03:00
Dmytro Meleshko
391e01b647 [zsh] get rid of some useless things 2021-05-11 10:58:34 +03:00
4 changed files with 9 additions and 12 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
*.pyc
node_modules/
.venv
*.md.html

View file

@ -58,3 +58,6 @@ setopt hist_verify
setopt inc_append_history
# synchronize history between active sessions
setopt share_history
# Among other things, used for compatibility with OMZ plugins.
ZSH_CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/dotfiles"

View file

@ -1,11 +1,6 @@
#!/usr/bin/env zsh
ZSH_CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/dotfiles"
if [[ ! -d "$ZSH_CACHE_DIR" ]]; then
mkdir -pv "$ZSH_CACHE_DIR"
fi
source "$ZSH_DOTFILES/zplg.zsh"
_plugin() {
_perf_timer_start "plugin $1"

View file

@ -46,22 +46,20 @@ _perf_timer_start "total"
fi
# }}}
for script in functions options path env plugins aliases completion zle prompt colorscheme; do
for script in functions options path env zplg plugins aliases completion zle prompt colorscheme; do
_perf_timer_start "$script.zsh"
source "$ZSH_DOTFILES/$script.zsh"
_perf_timer_stop "$script.zsh"
done
if [[ -d "$ZSH_DOTFILES/custom" ]]; then
_perf_timer_start "custom scripts"
for script in $ZSH_DOTFILES/custom/*.zsh; do
_perf_timer_start "custom/${script##*/}"
source "$script"
_perf_timer_stop "custom/${script##*/}"
done
_perf_timer_stop "custom scripts"
fi
command_exists rbenv && eval "$(rbenv init -)"
_perf_timer_stop "total"
welcome