title: How can I intercept commands that contain a certain string?
body: <p>Sometimes, it happens to me that I'm executing certain commands, and only afterwards I realize that I sent the wrong parameter to a command ( like a restart of a Heroku application ). I'd like to modify bash in such a way that if it sees a command containing a certain string, it will prompt me whether I'm sure or not. For example ( imagine the string is tempus ):</p>
  
  <pre><code>$ heroku restart --app tempus
  </code></pre>
  
  <p>Now, I'd like bash to prompt me with a Y/N prompt, and if I type <code>y</code>, only then I'd like it to execute the command. If I type N, the command will not be executed. How could I handle this problem?</p>