diff options
author | gregstallings <gregstallings@gmail.com> | 2013-09-21 16:24:33 +0200 |
---|---|---|
committer | Mathias Bynens <mathias@qiwi.be> | 2013-09-21 16:25:42 +0200 |
commit | 6dd0179645326ff59cb2268bd5aab99f2c403443 (patch) | |
tree | 45697d55089c0a3f0de3c6ebc82a0a114fd41097 | |
parent | 3dc47ffd5559eddf7b1a5ce1e2085fa072ad817f (diff) | |
download | dotfiles-6dd0179645326ff59cb2268bd5aab99f2c403443.tar.gz dotfiles-6dd0179645326ff59cb2268bd5aab99f2c403443.tar.bz2 dotfiles-6dd0179645326ff59cb2268bd5aab99f2c403443.zip |
.functions: Add `s` to open stuff in Sublime Text
Closes #252.
-rw-r--r-- | .aliases | 1 | ||||
-rw-r--r-- | .functions | 9 |
2 files changed, 9 insertions, 1 deletions
@@ -15,7 +15,6 @@ alias g="git" alias h="history" alias j="jobs" alias v="vim" -alias s="subl ." alias o="open" alias oo="open ." @@ -261,3 +261,12 @@ function m() { mate "$@" fi } +# `s` with no arguments opens the current directory in Sublime, otherwise opens +# the given location +function s() { + if [ $# -eq 0 ]; then + subl . + else + subl "$@" + fi +} |