Created
March 7, 2010 06:12
-
-
Save indirect/324208 to your computer and use it in GitHub Desktop.
super-powered mate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Enhanced mate command that can open and tab-complete tmproj files in ~/.tmproj | |
# To use, save your TM projects as ~/.tmproj/foo.tmproj, then open with `mate foo` | |
function mate { | |
if [ -a "$(cd ~/.tmproj; pwd)/$1.tmproj" ]; then | |
open "$(cd ~/.tmproj; pwd)/$1.tmproj" | |
else | |
/usr/bin/env mate "$1" | |
fi | |
} | |
complete -f -W '$(ls ~/.tmproj | sed s/.tmproj//)' mate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment