diff options
author | sam-lunt <samuel.j.lunt@gmail.com> | 2018-07-02 10:05:24 -0500 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2018-07-02 17:05:24 +0200 |
commit | 7cba6bb038fb699c44532992ee75e836b6576ac7 (patch) | |
tree | 0d257c8bb86b31db8016b02a44d1d266e2a16df8 | |
parent | 9711d8f7316339b21c1043c74020c944eda7a2f5 (diff) | |
download | zsh-7cba6bb038fb699c44532992ee75e836b6576ac7.tar.gz zsh-7cba6bb038fb699c44532992ee75e836b6576ac7.tar.bz2 zsh-7cba6bb038fb699c44532992ee75e836b6576ac7.zip |
Enable passing multiple directories to take (#6900)
* enable passing multiple directories to take
* Update take function
Do not call cd if mkdir fails
-rw-r--r-- | lib/functions.zsh | 3 |
1 files changed, 1 insertions, 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() { |