diff --git a/plugins/textmate/init.zsh b/plugins/textmate/init.zsh index 80564b1..6a66820 100644 --- a/plugins/textmate/init.zsh +++ b/plugins/textmate/init.zsh @@ -9,6 +9,10 @@ alias mr='mate CHANGELOG app config db lib public script spec test' # Functions function tm() { - cd "$1" && mate . + if [[ -z "$1" ]]; then + mate . + else + ( [[ -d "$1" ]] && cd "$1" && mate . ) + fi }