Re: Finding the last foreground command in the current session

2015-07-12 Thread Chet Ramey
On 7/12/15 6:57 AM, Egmont Koblinger wrote: > Hi guys, > > Friendly ping... is there anything we could do? > > Chet, I couldn't find anything related to this in 4.4-alpha's changes. > Is there any chance to get this feature to 4.4-final? So far, I haven't seen a sufficiently compelling rationale

Re: Finding the last foreground command in the current session

2015-07-12 Thread Egmont Koblinger
Hi guys, Friendly ping... is there anything we could do? Chet, I couldn't find anything related to this in 4.4-alpha's changes. Is there any chance to get this feature to 4.4-final? thx, egmont On Fri, May 22, 2015 at 11:15 AM, Debarshi Ray wrote: > Hey, > > Any further comments / questions /

Re: Finding the last foreground command in the current session

2015-06-10 Thread Stephane Chazelas
2015-06-09 19:44:44 +, Debarshi Ray: > Hey Stephane, > > On Fri, May 22, 2015 at 02:38:31PM +0100, Stephane Chazelas wrote: > > Can you not just do a tcgetpgrp() periodically > > If by "periodically" you mean "polling", then no, I don't want to do > that. I know a few terminal emulators do t

Re: Finding the last foreground command in the current session

2015-06-09 Thread Debarshi Ray
Hey Stephane, On Fri, May 22, 2015 at 02:38:31PM +0100, Stephane Chazelas wrote: > Can you not just do a tcgetpgrp() periodically If by "periodically" you mean "polling", then no, I don't want to do that. I know a few terminal emulators do that, but it is bad for power consumption and battery li

Re: Finding the last foreground command in the current session

2015-05-22 Thread Stephane Chazelas
2015-02-05 13:18:43 +, Debarshi Ray: > Hey, > > I work on gnome-terminal. I am trying to add support for notifying the > user when a long-running command finishes in an inactive tab or > window. I am currently emitting a custom escape sequence [1] from > PROMPT_COMMAND, with the command parse

Re: Finding the last foreground command in the current session

2015-05-22 Thread Debarshi Ray
Hey, Any further comments / questions / progress regarding this? Can I help in some way? Thanks, Debarshi pgpeO2RToXVkn.pgp Description: PGP signature

Re: Finding the last foreground command in the current session

2015-03-01 Thread Egmont Koblinger
Hi Chet & everyone, The goal is to notify the user if a long-running command (e.g. a compilation) finishes, and the notification should mention the given command. $BASH_COMMAND seems to contain the command that's about to be executed, whereas what we'd need is the command that just terminated. $B

Re: Finding the last foreground command in the current session

2015-03-01 Thread Chet Ramey
On 2/5/15 8:18 AM, Debarshi Ray wrote: > What do you think? Having bash offer a way to reliably find the last > foreground command interactively run by the user would be helpful. > I took a quick look at this, and I think what you want is $BASH_COMMAND unless the last command is `fg'? If that's

Finding the last foreground command in the current session

2015-02-05 Thread Debarshi Ray
Hey, I work on gnome-terminal. I am trying to add support for notifying the user when a long-running command finishes in an inactive tab or window. I am currently emitting a custom escape sequence [1] from PROMPT_COMMAND, with the command parsed from $(history 1) as an argument. However, we are

Finding the last foreground command in the current session

2015-02-05 Thread Debarshi Ray
Hey, I work on gnome-terminal. I am trying to add support for notifying the user when a long-running command finishes in an inactive tab or window. I am currently emitting a custom escape sequence [1] from PROMPT_COMMAND, with the command parsed from $(history 1) as an argument. However, we are