From 7cba6bb038fb699c44532992ee75e836b6576ac7 Mon Sep 17 00:00:00 2001 From: sam-lunt Date: Mon, 2 Jul 2018 10:05:24 -0500 Subject: [PATCH] Enable passing multiple directories to take (#6900) * enable passing multiple directories to take * Update take function Do not call cd if mkdir fails --- lib/functions.zsh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/functions.zsh b/lib/functions.zsh index dd8311611..1066fed57 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -11,8 +11,7 @@ function upgrade_oh_my_zsh() { } function take() { - mkdir -p $1 - cd $1 + mkdir -p $@ && cd ${@:$#} } function open_command() {