浏览代码

Enable passing multiple directories to take (#6900)

* enable passing multiple directories to take

* Update take function

Do not call cd if mkdir fails
sam-lunt 5 年之前
父节点
当前提交
7cba6bb038
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      lib/functions.zsh

+ 1 - 2
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() {