bash-command-timer
bash-command-timer copied to clipboard
Preserve underscore variable ($_)
To preserve the variable underscore ($_), can pass it as argument function in a trap DEBUG.
Originally posted by @NRZCode in https://github.com/jichu4n/bash-command-timer/issues/6#issuecomment-2300823123
The PROMPT_COMMAND variable is an array