I have
trap 'python my_script.py --command \"$BASH_COMMAND\"' DEBUG
my_script.py is
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument('--command', default="")
args = parser.parse_args()
command = args.command
print("COMMAND", command)
But when I run a bash command the output is
PROMPT_COMMAND='python my_script.py'
Rather than the command that was run that triggered the trap.
How can I get the initial run command from my_script.py?