From: Pier Paolo Grassi <pierpaolog@gmail.com>
To: Zsh-Users List <zsh-users@zsh.org>
Subject: commit to history
Date: Fri, 27 Aug 2021 23:14:25 +0200 [thread overview]
Message-ID: <CAP+y1xDexsPTAy_BvMD1drybBMFA7BYxVq+7z6LJGSeYjhzrkg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 643 bytes --]
Hello, I have a zle widget that I use to send the current buffer to the
history without executing it, and then start a new prompt (to clear the
buffer and reset the current history position), it is implemented a such:
commit_to_history() {
print -s ${(q)${(z)BUFFER}}
zle send-break
}
the send-break widget returns a status code 1, and since I have a precmd
that displays the last status code, I was wondering if it is in some way
possibile to suppress that return status. I have tried with {zle
send-break} always {TRY_BLOCK_ERROR=0} but didn't help. It is a very minor
annoyance, but I am curious nonetheless
thanks
Pier Paolo Grassi
[-- Attachment #2: Type: text/html, Size: 952 bytes --]
next reply other threads:[~2021-08-27 21:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-27 21:14 Pier Paolo Grassi [this message]
2021-08-27 21:59 ` Bart Schaefer
2021-08-28 19:34 ` Pier Paolo Grassi
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=CAP+y1xDexsPTAy_BvMD1drybBMFA7BYxVq+7z6LJGSeYjhzrkg@mail.gmail.com \
--to=pierpaolog@gmail.com \
--cc=zsh-users@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).