fix(hooks): Fix glow hook overriding glow command

Fix the issue where as the glow hook was called glow it would be called
instead of the command glow.
This commit is contained in:
Robert Morrison 2024-02-19 14:57:25 +00:00
parent 6a7f432e33
commit cd0ec0c563
Signed by: robert
GPG Key ID: 73E012EB3F4EC696
2 changed files with 2 additions and 2 deletions

2
hooks
View File

@ -3,7 +3,7 @@ for file in $(find $ZDOTDIR/hooks.d -type f); do
source "$file"
done
add-zsh-hook -Uz chpwd glow
add-zsh-hook -Uz chpwd _hook_glow
add-zsh-hook -Uz chpwd osc7
add-zsh-hook -Uz precmd termtitle
add-zsh-hook -Uz precmd osc113

View File

@ -1,5 +1,5 @@
## Load readme with glow (if available)
glow() {
_hook_glow() {
has glow || return 0
find $PWD -maxdepth 1 -iname 'readme.md' -exec glow {} \;
}