[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Finding the last foreground command in the current session
From: |
Chet Ramey |
Subject: |
Re: Finding the last foreground command in the current session |
Date: |
Sun, 01 Mar 2015 18:21:14 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
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 correct, we can think about
a way to make that information available.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- Re: Finding the last foreground command in the current session,
Chet Ramey <=