From 0206842488f0a2013d6c7523cb8d873e4fc99dc2 Mon Sep 17 00:00:00 2001 From: surtur Date: Fri, 18 Aug 2023 16:25:33 +0200 Subject: [PATCH] functions.zsh: add timeplugins func --- .zsh/functions.zsh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.zsh/functions.zsh b/.zsh/functions.zsh index 19dc7d0..0efc446 100644 --- a/.zsh/functions.zsh +++ b/.zsh/functions.zsh @@ -37,6 +37,18 @@ timesh() { for i in $(seq 1 10); do time $shell -i -c exit; done } +timeplugins() { + for plugin ($plugins); do + timer=$(($(date +%s%N)/1000000)) + if [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then + source $ZSH/plugins/$plugin/$plugin.plugin.zsh + fi + now=$(($(date +%s%N)/1000000)) + elapsed=$(($now-$timer)) + echo $elapsed":" $plugin; + done +} + delete-branches() { git branch |