Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15614 > unrolled thread

Re: [FR] save command times and exit status in history automatically

Started byIlya Sher <is@beame.io>
First post2019-11-19 15:34 +0000
Last post2019-11-19 15:34 +0000
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [FR] save command times and exit status in history automatically Ilya Sher <is@beame.io> - 2019-11-19 15:34 +0000

#15614 — Re: [FR] save command times and exit status in history automatically

FromIlya Sher <is@beame.io>
Date2019-11-19 15:34 +0000
SubjectRe: [FR] save command times and exit status in history automatically
Message-ID<mailman.1971.1574177686.13325.bug-bash@gnu.org>
Hi

My thoughts regarding which properties / fields can be useful to have in history (originally pertaining to another shell but hope it's helpful):

https://github.com/ngs-lang/ngs/wiki/History-Design#commands-history

Regards,
Ilya


On 8 Nov 2019, at 1:47, Ángel <angel@16bits.net<mailto:angel@16bits.net>> wrote:

On 2019-11-07 at 12:18 -0800, Daniel Colascione wrote:
Maybe what I
really want is something like $?, but instead of containing exit
status, it would contain information from a struct rusage (derived
from wait4) for the last command. Or something like that anyway.

I would like having those variables, too. There was a related discussion
some time ago, and a workaround was mentioned (using PROMPT_COMMAND and
traps if I remember correctly), but I didn't like that approach too
much.

Would having such variables solve your needs? (using PROMPT_COMMAND to
copy them into a file, perhaps). I would expect that storing the values
from last wait4 would be much less intrusive than messing with history.


Kind regards




[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web