Thread (20 messages) flat view 20 messages, 7 authors, 2016-06-15

Re: [RFC/PATCH] shortstatus v1

From: Sitaram Chamarty <hidden>
Date: 2016-06-15 22:46:08

On 2009-02-10, Junio C Hamano [off-list ref] wrote:
Tuncer Ayaz [off-list ref] writes:
quoted
Adding git 'shortstatus --mini' to PS1 is not noticeable or 1sec
maximum in my tree. As a worst case it takes 10secs in a clone
of WebKit.git.
Frankly, I think having to spend one second to add only one or two bits to
PS1 is simply spending one second too much.
[snip]
Do you really need more than "diff-index --cached --exit-code" in your
$PS1 code, and so why?  Does the added feature your "shortstatus --mini"
offers over "diff-index --cached --exit-code" justify the latency penalty
to the user?
I wonder if I could ask people opinions on a trick I pulled,
which is basically maintain a state of the value of $SECONDS
each time the user is shown a bash prompt.  If the value is
the same as last time (meaning he hit enter twice in a row
very quickly), it runs the extra stuff.

It sounds like a dirty trick, but seems to work fine and
give you the best of both worlds.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help