aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgregstallings <gregstallings@gmail.com>2013-09-15 21:44:43 -0700
committerMathias Bynens <mathias@qiwi.be>2013-09-21 16:21:16 +0200
commit3dc47ffd5559eddf7b1a5ce1e2085fa072ad817f (patch)
treee6b4bfc173204f64f64f0f49feda7b478be1094e
parentc8a48ee28c70ab8ad6b3f960af33f8e498780b14 (diff)
downloaddotfiles-3dc47ffd5559eddf7b1a5ce1e2085fa072ad817f.tar.gz
dotfiles-3dc47ffd5559eddf7b1a5ce1e2085fa072ad817f.tar.bz2
dotfiles-3dc47ffd5559eddf7b1a5ce1e2085fa072ad817f.zip
.functions: Add `m` to open stuff in TextMate
Closes #253.
-rw-r--r--.aliases1
-rw-r--r--.functions10
2 files changed, 10 insertions, 1 deletions
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
+}