zsh-workers
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Akinori MUSHA <knu@iDaemons.org>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH] Set TMPSUFFIX=.zsh in edit-command-line
Date: Sat, 29 May 2021 11:41:08 +0000	[thread overview]
Message-ID: <20210529114108.GA25290@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <92d2b09c-9559-7085-a521-29714e38f02c@iDaemons.org>

Akinori MUSHA wrote on Fri, May 28, 2021 at 22:35:08 +0900:
> 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.

Thanks for the patch.

Vim already sets the filetype correctly in this case, via the «au
BufNewFile,BufRead zsh*,zlog* call s:StarSetf('zsh')» pattern match in
$VIMRTUNETIME/filetype.vim.  However, I suspect that pattern produces
some false negatives too (e.g., it also matches in cases such as «vim
=(ls)»), so I think this change would be an improvement even for Vim users.

> It's so much easier to edit a command line in a proper editing mode than in
> a plain text mode.

Agreed.  The patch looks good to me, but I haven't time to review or
test it properly, so I'll defer to others on that.

Thanks,

Daniel



  reply	other threads:[~2021-05-29 11:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 13:35 Akinori MUSHA
2021-05-29 11:41 ` Daniel Shahaf [this message]
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=20210529114108.GA25290@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=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).