title: Access latest command (not args) from PROMPT_COMMAND
body: <p>I have standalone <code>PROMPT_COMMAND=</code> in my <code>.bash_profile</code>. Every time user input a command, it's being run.
  I want to get the first word of the last command by user.</p>
  
  <p>For example, if the user runs: <code>$ printf "Hey!"</code>, I want to access <code>printf</code> from my <code>PROMPT_COMMAND</code>.</p>
  
  <p><code>$0</code> gives me <code>-bash</code> and <code>$1</code>, <code>$2</code>, ... gives me arguments as said on the site below.
  <a href="https://wiki.bash-hackers.org/scripting/posparams#the_first_argument" rel="nofollow noreferrer">https://wiki.bash-hackers.org/scripting/posparams#the_first_argument</a></p>
  
  <p>But how can I access the first word like <code>printf</code> in the above example?</p>
  
  <p>Preferably, I want to use the build-in commands as much and cleanly as possible.</p>