mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-27 04:40:59 +01:00
zed: Add -- to the `functions' builtin calls
Reported on IRC:
% autoload zed; zed -f -- "-zgen-prezto-load"
zed:83: bad option: -g
-zgen-prezto-load() {
}
This commit is contained in:
parent
f01cf05e53
commit
8d1e882b78
2 changed files with 6 additions and 4 deletions
|
|
@ -69,10 +69,10 @@ fi
|
|||
setopt localoptions nobanghist
|
||||
|
||||
if ((fun)) then
|
||||
var="$(functions $expand $1)"
|
||||
var="$(functions $expand -- $1)"
|
||||
# If function is undefined but autoloadable, load it
|
||||
if [[ $var = *\#\ undefined* ]] then
|
||||
var="$(autoload +X $1; functions $1)"
|
||||
var="$(autoload +X $1; functions -- $1)"
|
||||
elif [[ -z $var ]] then
|
||||
var="$1() {
|
||||
}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue