title: Repeat last command with "sudo"
body: <p>I often forget to run commands with <code>sudo</code>. I'm looking for a way to make a bash function (or alias) for repeating the last command with <code>sudo</code>. Something like:</p>
  
  <pre><code>S() {
      sudo $(history 1)
  }
  </code></pre>
  
  <p>Any ideas?</p>