zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] enable elaped time with incappendhistory
Date: Fri, 11 Oct 2013 11:34:20 +0100	[thread overview]
Message-ID: <20131011113420.29c2060b@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <20131011110533.66a857a6@pwslap01u.europe.root.pri>

On Fri, 11 Oct 2013 11:05:33 +0100
Peter Stephenson <p.stephenson@samsung.com> wrote:
> I'm wondering if there's a neater way of doing this, but I think the
> answer is "not much neater, anyway".

May as well mention it before I go back to sleep...

Actually, I think we could split hend() in two.  The early part needs to
return a status indicating if it's OK to execute the line that's been
retrieved (remember the history mechanism sits on top of the input
mechanism, an unusual case of the shell obeying the standard rules of
hierarchy).  I don't think it actually needs to perform the save (or
sharehistory rewrite) at that point.  It would probably be safe to do
that later in loop().

The one thing this might get wrong is if you were using share_history
and expected to be able to retrieve a line you were still executing in
another window, i.e. corresponding to a command that takes a significant
time.  This sounds a plausible requirement.  Obviously it's entirely
incompatible with the requirement of getting the execution time for the
command correct.  (Well, unless you save the line twice using
the sharehistory editing mechanism, but this is getting silly.)

I don't actually intend to look further at this unless the current
situation proves impossible to handle.

pws


      reply	other threads:[~2013-10-11 10:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-05 12:50 Han Pingtian
2013-10-05 21:04 ` Peter Stephenson
2013-10-07 10:32   ` Peter Stephenson
2013-10-07 10:56     ` Peter Stephenson
2013-10-10 17:30       ` Peter Stephenson
2013-10-11 10:05         ` Peter Stephenson
2013-10-11 10:34           ` Peter Stephenson [this message]

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=20131011113420.29c2060b@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.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).