Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] zed (fned): When editing a new function. escape its name.



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"



Messages sorted by: Reverse Date, Date, Thread, Author