diff --git a/.aliases b/.aliases index e3b623a..336bc0b 100644 --- a/.aliases +++ b/.aliases @@ -15,7 +15,6 @@ alias g="git" alias h="history" alias j="jobs" alias v="vim" -alias m="mate ." alias s="subl ." alias o="open" alias oo="open ." diff --git a/.functions b/.functions index a95e7bc..cf64dc6 100644 --- a/.functions +++ b/.functions @@ -251,3 +251,13 @@ function gi() { local IFS=, eval npm install --save-dev grunt-{"$*"} } + +# `m` with no arguments opens the current directory in TextMate, otherwise +# opens the given location +function m() { + if [ $# -eq 0 ]; then + mate . + else + mate "$@" + fi +}