@gvwilson commented on Thu May 17 2018
From datacamp-content/courses-introduction-to-shell#129: if the user types !cat to repeat the last cat command, the user input we see in the SCT is cat filename (or whatever they last typed), not !cat, because history expansion is done before we get the text to check.