7cba6bb038fb699c44532992ee75e836b6576ac7

Author
sam-lunt <samuel.j.lunt@gmail.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Enable passing multiple directories to take (#6900)

* enable passing multiple directories to take

* Update take function

Do not call cd if mkdir fails

Diff

 1diff --git a/lib/functions.zsh b/lib/functions.zsh
 2index dd8311611eb9be1f3e460adb0c2a80e229f16bf7..1066fed573959cc5cb9d0fb99020d19d3a8b4a63 100644
 3--- a/lib/functions.zsh
 4+++ b/lib/functions.zsh
 5@@ -11,8 +11,7 @@ function upgrade_oh_my_zsh() {
 6 }
 7 
 8 function take() {
 9-  mkdir -p $1
10-  cd $1
11+  mkdir -p $@ && cd ${@:$#}
12 }
13 
14 function open_command() {