marlonrichert / zsh-snap

⚡️ Znap! Fast, easy-to-use tools for Zsh dotfiles & plugins, plus git repos
MIT License
1.32k stars 38 forks source link

Fix non-interactive compilation #268

Closed rcloran closed 9 months ago

rcloran commented 1 year ago

.znap.compile checks the funcstack, with the intent of determining whether or not to output user visible messages -- they should only be output when called directly from the znap CLI tool.

Unfortunately, this check was written in a way that means that when called from outside of the main znap function (eg, compdump background compilation, auto-compile), no compilation happened.

This change re-orders the checks so that .znap.compile works when called from other parts of znap, like compdump compilation.

Fixes #267

Before submitting your PR (pull request), please check the following:

rcloran commented 1 year ago

Seems that this also fixes auto-compile... but that's the only other caller of .znap.compile that I've checked.

marlonrichert commented 9 months ago

Thanks!