News for hackers. Stuff that matters.
Re:Curate Your Shell History by pabs3 on Monday June 09, 2025 @04:01AM (#44222339)
You might also want to add one improvement:

Write commands to history files before running the commands instead of after the commands finish:

  trap 'history -a' DEBUG
Or if you already have a DEBUG trap:

  trap "history -a ; $(trap -p DEBUG | cut -d "'" -f 2)" DEBUG

There are no comments on this comment yet.