Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] zed (fned): When editing a new function. escape its name.
- X-seq: zsh-workers 40126
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] zed (fned): When editing a new function. escape its name.
- Date: Thu, 8 Dec 2016 12:54:39 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=xSL kqmUowVBlwe8KDjJWOhFwerQ=; b=lkLGu4NCFxxk1CvdKVm61oBr8+cbAXeU0k9 XCt5KOY4cSopeycv5UBcGQLVHGyWURtGlinET12/nkS7/ypByPw+NF5jjCm2bhVX zL/S4qKznZUFT1YK3M+QadZ3cRpZozwcrWuH6ziZCfQsNukCUzK3qECUQZSFG71w wXqfibLk=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=xS LkqmUowVBlwe8KDjJWOhFwerQ=; b=iWOsmpZuAEMuKeEoET2KMt52XHx8b+F9GG 0bzaYO8WzEne1LztHgAeMLfV7QumxZfhrzKD7RRtcSY3V6DCQJqnPo6oyT4ZEDTI idxHQ69ToD5WleT4Xoin3H/FioZNcPKPJjxJXEYkEeUxKVFm+wNhlQl//4/xes4r Xe6kB2MO0=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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