title: How do you set default application for `open` command in terminal based on file extension type?
body: <p>Some time ago I set up Sublime text 2 as my default editor for GIT in the command line terminal. I would now like to change it to LightTable, but am having some trouble. I have set both the <strong>VISUAL</strong> and <strong>EDITOR</strong> environment variables to <strong>LightTable</strong> and that does the trick for most extensions. But even though I set the .gitconfig file <strong>editor</strong> variable to <strong>LightTable</strong> as well, using several variations of this command: </p>
  
  <pre><code>git config --global core.editor "'/Applications/LightTable.app' -w"
  </code></pre>
  
  <p>and this one: </p>
  
  <pre><code>export GIT_EDITOR=LightTable
  </code></pre>
  
  <p>it is continuing to open .md files with sublime text 2. Other file extensions are also opening with TextEdit or other applications. Is there an easy way to reign in the chaos and set my default opening applications based on extension? I have read the man page for <strong>open</strong> and it mentions LaunchServices, but I can't find that on my hard-drive. I'm using bash with  Unix(Darwin) on a mac running OSX. Thanks in advance!</p>