about summary refs log tree commit diff
path: root/Functions
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2016-12-08 12:54:39 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2016-12-09 08:21:07 +0000
commitfeb4be4a5e818bbbe4e5f9de725b272665148185 (patch)
tree725482fbaad4b1a8b59aac6fb67ff0e5023705f2 /Functions
parent37cbead9f22a9cbfee6b615bd78fbec40e1e44b2 (diff)
downloadzsh-feb4be4a5e818bbbe4e5f9de725b272665148185.tar.gz
zsh-feb4be4a5e818bbbe4e5f9de725b272665148185.tar.xz
zsh-feb4be4a5e818bbbe4e5f9de725b272665148185.zip
40126: zed (fned): When editing a new function. escape its name.
Example:

    % unfunction \(
    % fned \(
Diffstat (limited to 'Functions')
-rw-r--r--Functions/Misc/zed2
1 files changed, 1 insertions, 1 deletions
diff --git a/Functions/Misc/zed b/Functions/Misc/zed
index 0ea90c7df..77d392bc3 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"