From: Akinori MUSHA <knu@iDaemons.org>
To: zsh-workers@zsh.org
Subject: [PATCH] Set TMPSUFFIX=.zsh in edit-command-line
Date: Fri, 28 May 2021 22:35:08 +0900 [thread overview]
Message-ID: <92d2b09c-9559-7085-a521-29714e38f02c@iDaemons.org> (raw)
[-- Attachment #1.1.1: Type: text/plain, Size: 355 bytes --]
This patch makes the name of a temporary file to have a .zsh suffix so
that the invoked editor will know it's a zsh script. The .zsh suffix is
commonly recognized by editors like Emacs, Vim and VS Code.
It's so much easier to edit a command line in a proper editing mode than
in a plain text mode.
--
Akinori MUSHA / https://akinori.org/
[-- Attachment #1.1.2: 0001-Let-EDITOR-invoked-by-edit-command-line-know-it-s-a-.patch --]
[-- Type: text/plain, Size: 760 bytes --]
From 10a2d01b5163e79374060e65f968339a5f3145ae Mon Sep 17 00:00:00 2001
From: Akinori MUSHA <knu@idaemons.org>
Date: Fri, 28 May 2021 22:20:33 +0900
Subject: [PATCH] Let EDITOR invoked by edit-command-line know it's a zsh
script
---
Functions/Zle/edit-command-line | 1 +
1 file changed, 1 insertion(+)
diff --git a/Functions/Zle/edit-command-line b/Functions/Zle/edit-command-line
index 3781244b2..5f7ea321f 100644
--- a/Functions/Zle/edit-command-line
+++ b/Functions/Zle/edit-command-line
@@ -8,6 +8,7 @@
emulate -L zsh
local left right prebuffer buffer=$BUFFER lbuffer=$LBUFFER
+local TMPSUFFIX=.zsh
# set up parameters depending on which context we are called from,
# see below comment for more details
if (( REGION_ACTIVE )); then
--
2.30.1
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 203 bytes --]
next reply other threads:[~2021-05-28 13:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-28 13:35 Akinori MUSHA [this message]
2021-05-29 11:41 ` Daniel Shahaf
2021-05-31 22:54 ` Bart Schaefer
2021-06-02 3:27 ` Akinori MUSHA
2021-06-03 7:51 ` Oliver Kiddle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=92d2b09c-9559-7085-a521-29714e38f02c@iDaemons.org \
--to=knu@idaemons.org \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).