From 3dc47ffd5559eddf7b1a5ce1e2085fa072ad817f Mon Sep 17 00:00:00 2001 From: gregstallings Date: Sun, 15 Sep 2013 21:44:43 -0700 Subject: .functions: Add `m` to open stuff in TextMate Closes #253. --- .aliases | 1 - .functions | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) 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 +} -- cgit v1.2.3