From f369efe953a62abc1012daf70d932bd9f568b2e8 Mon Sep 17 00:00:00 2001 From: MaYuming Date: Fri, 30 Jun 2017 18:45:22 +0800 Subject: [PATCH] mkcd one or more dirs --- plugins/available/base.plugin.bash | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/available/base.plugin.bash b/plugins/available/base.plugin.bash index 5450a416..e028051a 100755 --- a/plugins/available/base.plugin.bash +++ b/plugins/available/base.plugin.bash @@ -91,13 +91,14 @@ function pmdown () function mkcd () { - about 'make a directory and cd into it' - param 'path to create' + about 'make one or more directorys and cd into the lastest one' + param 'one or more directorys to create' example '$ mkcd foo' example '$ mkcd /tmp/img/photos/large' + example '$ mkcd foo foo1 foo2 fooN' + example '$ mkcd /tmp/img/photos/large tmp/img/photos/self tmp/img/photos/Beijing' group 'base' - mkdir -p -- "$*" - cd -- "$*" + mkdir -p -- "$@" && eval cd -- "\"\$$#\"" } function lsgrep ()