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

Re: Spending time in PS1, was Re: [RFC/PATCH] shortstatus v1

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

On 2009-02-10, Johannes Schindelin [off-list ref] wrote:
Hi,

On Tue, 10 Feb 2009, Sitaram Chamarty wrote:
quoted
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.
As you know, I am a big fan of consistency.  In this light, I do not like 
Actually no; I haven't been here long enough yet.
it when I am shown something at times, and at other times not.
However, it seems to me that this discussion is about
reconciling two conflicting needs:

  - some people (not all) want certain info in the prompt
  - but getting that info is expensive so it shouldn't be in
    the prompt *all* the time

Such a conflict might well be served by showing something
sometimes, and at other times not.  A little bit of
DWIMmery, if you will...

In any case, one can always alias something to a single
letter (say "s") if one needs quick but not "in your face"
access to this info, making this whole discussion moot if it
should not be *in* the prompt.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help