zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] Add -- to the `functions' builtin calls
@ 2015-10-27 16:22 Eric Cook
  2015-10-27 17:54 ` [PATCH v2] " Eric Cook
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Cook @ 2015-10-27 16:22 UTC (permalink / raw)
  To: zsh-workers

Reported on IRC:

% autoload zed; zed -f -- "-zgen-prezto-load"
zed:83: bad option: -g
-zgen-prezto-load() {
}

---
 Functions/Misc/zed | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Functions/Misc/zed b/Functions/Misc/zed
index 010b69b..6628b13 100644
--- a/Functions/Misc/zed
+++ b/Functions/Misc/zed
@@ -80,10 +80,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() {
 }"
-- 
2.6.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-31 18:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-27 16:22 [PATCH] Add -- to the `functions' builtin calls Eric Cook
2015-10-27 17:54 ` [PATCH v2] " Eric Cook
2015-10-28  2:54   ` [PATCH] zed: fix argument parsing Eric Cook
2015-10-31 18:08     ` Eric Cook

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).