From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: $history[@] doesn't contain last element from $HISTFILE
Date: Fri, 14 Oct 2016 20:35:26 +0200 [thread overview]
Message-ID: <CAKc7PVCPb8gXtLF3Sy6O4Hkens_BTLG+wxkhC42nf-sjL1epDQ@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7bxHu3D1O5JPOAOi0mokXtzJY7iFCTJrV90izqmemAH1w@mail.gmail.com>
On 14 October 2016 at 19:44, Bart Schaefer <schaefer@brasslantern.com> wrote:
> This is a side-effect of the implementation of history, specifically
> that even with HISTSIZE=0 there is always one line (the immediately
> previous command) available for recall with up-history. Hence that
> final line is not actually "committed" into the history until the NEXT
> line is read, at which time it either goes into the history "for real"
> or is discarded.
>
> I pass no judgement at this time on Sebastian's assertion of whether
> the contents of $history[@] "should be" different, though it is
> potentially unexpected that $history[$HISTNO] is special-cased.
It's fine if it's not an unpredictable thing, I can stick to the
workaround (now not actually a workaround), not having to do an
is-at-least call in return. Although I'm not sure if by
$history[$HISTNO] you mean $history[$size], if there is something
unexpected there, it would be a problem.
Best regards,
Sebastian Gniazdowski
next prev parent reply other threads:[~2016-10-14 21:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-14 16:32 Sebastian Gniazdowski
2016-10-14 17:44 ` Bart Schaefer
2016-10-14 18:35 ` Sebastian Gniazdowski [this message]
2016-10-14 19:10 ` Bart Schaefer
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=CAKc7PVCPb8gXtLF3Sy6O4Hkens_BTLG+wxkhC42nf-sjL1epDQ@mail.gmail.com \
--to=sgniazdowski@gmail.com \
--cc=schaefer@brasslantern.com \
--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).