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

unposted: Avoid $0 for POSIX_ARGZERO compatibility.

This commit is contained in:
Daniel Shahaf 2016-07-28 18:01:36 +00:00
parent b816bb42cf
commit 8e029323a7
3 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,9 @@
2016-07-28 Daniel Shahaf <d.s@daniel.shahaf.name>
* unposted: Functions/Misc/add-zle-hook-widget,
Functions/Misc/add-zsh-hook: Avoid $0 for POSIX_ARGZERO
compatibility.
2016-07-28 Oliver Kiddle <opk@zsh.org>
* 38957: Functions/Zle/select-word-match,

View file

@ -62,7 +62,7 @@ function add-zle-hook-widget {
zstyle -a zle-hook types hooktypes
# This part copied from add-zsh-hook
local usage="Usage: $0 hook widgetname\nValid hooks are:\n $hooktypes"
local usage="Usage: $funcstack[1] hook widgetname\nValid hooks are:\n $hooktypes"
local opt
local -a autoopts
@ -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 "${0}: Cannot hook $fn to itself"
print -u2 "$funcstack[1]: Cannot hook $fn to itself"
return 1
fi
# No point in building the array until another is added

View file

@ -19,7 +19,7 @@ hooktypes=(
chpwd precmd preexec periodic zshaddhistory zshexit
zsh_directory_name
)
local usage="Usage: $0 hook function\nValid hooks are:\n $hooktypes"
local usage="Usage: add-zsh-hook hook function\nValid hooks are:\n $hooktypes"
local opt
local -a autoopts