From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Langbart <Langbart@protonmail.com>,
"zsh-users@zsh.org" <zsh-users@zsh.org>
Subject: Re: Foreign Commands Not Appearing in 'history' Array When 'sharehistory' Option is Enabled Until a Command is Entered
Date: Mon, 28 Oct 2024 18:35:05 +0100 [thread overview]
Message-ID: <CAN=4vMpYBhtKqh1BVTe01k4ssrsJYU-p8sXC=_kz6xPs_3M6yw@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7ZOwgzV9gb-Zfn-NxWmpa0yPLvevLrApMSYK9S_qAdK-g@mail.gmail.com>
On Mon, Oct 28, 2024 at 5:43 PM Bart Schaefer <schaefer@brasslantern.com> wrote:
>
> Short answers:
>
> On Mon, Oct 28, 2024 at 8:06 AM Langbart <Langbart@protonmail.com> wrote:
>>
>>
>> is it a bug that when the 'sharehistory' option is enabled, commands from other shells ('foreign') aren't included in the 'history' array until the user enters a command?
>
> No.
I believe the OP is saying that after you execute a command in one
terminal and press ENTER in another terminal, within that second
terminal all widgets that operate on history, such as
history-incremental-search-backward, will see the command, but the
`history` array won't contain it. You would need to execute a
non-empty command in the second terminal for `history` to get updated.
This sounds quite strange and unexpected to me. Is this really
intended? Why is an empty command enough to for all history related
widgets to pick up commands executed in another terminal, but for
`history` to update you need to execute a non-empty command?
Roman
P.S.
I haven't actually tried it but this is my understanding based on what
the OP wrote here and on github.
next prev parent reply other threads:[~2024-10-28 17:35 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-28 15:06 Langbart
2024-10-28 16:42 ` Bart Schaefer
2024-10-28 17:35 ` Roman Perepelitsa [this message]
2024-10-28 18:14 ` Bart Schaefer
2024-10-28 18:22 ` Roman Perepelitsa
2024-11-24 7:41 ` Roman Perepelitsa
2024-11-25 20:11 ` Bart Schaefer
2024-11-26 9:13 ` Mikael Magnusson
2024-11-24 4:47 ` Langbart
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='CAN=4vMpYBhtKqh1BVTe01k4ssrsJYU-p8sXC=_kz6xPs_3M6yw@mail.gmail.com' \
--to=roman.perepelitsa@gmail.com \
--cc=Langbart@protonmail.com \
--cc=schaefer@brasslantern.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).