Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework preexec hooks to be more centralized
It seems we are constantly adding new features that need new preexec hooks. Rather than continue to bloat prompt_on() and __lp_disable_hooks(), break everything out into a __lp_preexec() function that can be expanded easily. Also note that I found a bug: removing the DEBUG trap does not work, as the DEBUG trap can be set inside a function and only apply to that function. So removing it will unset the trap for that function only. Likely there is a way around this with setting the shell option that makes functions inherit the DEBUG trap of the global scope, but it needs a lot of testing, and this has likely been broken from the start.
- Loading branch information