1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-01 05:16:05 +01:00

unposted: Prefix function's name to its error messages.

This commit is contained in:
Daniel Shahaf 2016-07-27 14:04:44 +00:00
parent 8e06a6a28a
commit 74722c7392
2 changed files with 5 additions and 2 deletions

View file

@ -1,5 +1,8 @@
2016-07-27 Daniel Shahaf <d.s@daniel.shahaf.name>
* unposted: Functions/Misc/add-zle-hook-widget: Prefix function's
name to its error messages.
* unposted (after 38939): Completion/Unix/Command/_git:
_git-rebase: Unbreak.

View file

@ -25,7 +25,7 @@ emulate -L zsh
# This is probably more safeguarding than necessary
zmodload -e zsh/zle || return 1
{ zmodload zsh/parameter && zmodload zsh/zleparameter } || {
print -u2 "Need parameter modules for zle hooks"
print -u2 "add-zle-hook-widget: Need parameter modules for zle hooks"
return 1
}
@ -130,7 +130,7 @@ function add-zle-hook-widget {
# Check whether attempting to add a widget named for the hook
if [[ "$fn" = "$hook" ]]; then
if [[ -n "${widgets[$fn]}" ]]; then
print -u2 "Cannot hook $fn to itself"
print -u2 "${0}: Cannot hook $fn to itself"
return 1
fi
# No point in building the array until another is added