You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've just started using geometry against the mnml branch and have found that even with geometry_exec_time in a prompt, it doesn't actually show for long running commands.
I don't know much about the internals of ZSH, but I think I've narrowed it down to the fact that the time_command_begin function doesn't fire (the preexec hook doesn't seem to load it). Further testing leads me to believe that this is caused by #273 because if I copy the appropriate few lines from the function file into geometry.zsh, it works.
The text was updated successfully, but these errors were encountered:
It's caused by the autoload -Uk flag which we opted for instead of the changes in #273. Since all ZSH hooks are evaluated in subshells due to the lazy loading, the top-level shell will never initialize the hooks. We're discussing in #272, and I think we're likely to revert the lazy loading for now until we can find a working approach to do it. For now you can change the line autoload -Uk $fun in geometry.zsh back to . $fun for a temporary fix... here's the diff:
diff --git a/geometry.zsh b/geometry.zsh
index dc4942d..f1f066d 100644
--- a/geometry.zsh+++ b/geometry.zsh@@ -12,7 +12,7 @@ typeset -gA GEOMETRY; GEOMETRY[ROOT]=${0:A:h}
autoload -U add-zsh-hook
-function { local fun; for fun ("${GEOMETRY[ROOT]}"/functions/*) autoload -Uk $fun }+function { local fun; for fun ("${GEOMETRY[ROOT]}"/functions/*) . $fun }
(( $+functions[ansi] )) || ansi() { (($# - 2)) || echo -n "%F{$1}$2%f"; }
Sorry for the inconvenience. The changes will most likely be pushed today.
I've just started using geometry against the mnml branch and have found that even with
geometry_exec_time
in a prompt, it doesn't actually show for long running commands.I don't know much about the internals of ZSH, but I think I've narrowed it down to the fact that the
time_command_begin
function doesn't fire (the preexec hook doesn't seem to load it). Further testing leads me to believe that this is caused by #273 because if I copy the appropriate few lines from the function file intogeometry.zsh
, it works.The text was updated successfully, but these errors were encountered: