zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] zed (fned): When editing a new function. escape its name.
@ 2016-12-08 12:54 Daniel Shahaf
  0 siblings, 0 replies; only message in thread
From: Daniel Shahaf @ 2016-12-08 12:54 UTC (permalink / raw)
  To: zsh-workers

Example:

    % unfunction \(
    % fned \(
---
 Functions/Misc/zed | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Functions/Misc/zed b/Functions/Misc/zed
index 0ea90c7..77d392b 100644
--- a/Functions/Misc/zed
+++ b/Functions/Misc/zed
@@ -76,7 +76,7 @@ if ((fun)) then
   if [[ $var = *\#\ undefined* ]] then
     var="$(autoload +X $1; functions -- $1)"
   elif [[ -z $var ]] then
-    var="$1() {
+    var="${(q-)1} () {
 }"
   fi
   vared -M zed -m zed-vicmd var && eval function "$var"


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-12-08 13:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-08 12:54 [PATCH] zed (fned): When editing a new function. escape its name Daniel Shahaf

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).