3 ms·
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
by pabs3 1y ago
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