title: Alias with Argument in Bash - Mac
body: <p>Hi there trying to add an argument to an alias in bash. I'm using a Mac. I've searched a number of related questions:
  <a href="https://stackoverflow.com/questions/902946/about-bash-profile-bashrc-and-where-should-alias-be-written-in">Alias in Bash</a>, <a href="https://stackoverflow.com/questions/3778065/bash-alias-with-argument-and-autocompletion">Alias in Bash with autocomplete</a>, and a few others yet still can't sort this out. I know I need to use a function to create an alias that takes an input but it's unclear if its meant to look like any of the below options. All inputs in .bash_profile.</p>
  
  <pre><code>function mins_ago () { `expr $(date +%s) - 60 \* "$1"`; }
  
  alias mins_ago = function mins_ago () { `expr $(date +%s) - 60 \* "$1"`; }
  
  alias mins_ago = "function mins_ago () { `expr $(date +%s) - 60 \* "$1"`; }"
  
  alias mins_ago = function mins_ago () { `expr $(date +%s) - 60 \* $1`; }
  </code></pre>
  
  <p>None of these seem to work. I either get a syntax error or it doesn't recognize the argument.</p>
  
  <p>What is the actual line you'd put in <code>.bash_profile</code> to sort this properly? Thank you in advance. Is the <code>alias</code> bit included or do I just proceed to the function definition?</p>