mkcd one or more dirs

pull/994/head
MaYuming 2017-06-30 18:45:22 +08:00
parent f19a8b88eb
commit f369efe953
1 changed files with 5 additions and 4 deletions

View File

@ -91,13 +91,14 @@ function pmdown ()
function mkcd () function mkcd ()
{ {
about 'make a directory and cd into it' about 'make one or more directorys and cd into the lastest one'
param 'path to create' param 'one or more directorys to create'
example '$ mkcd foo' example '$ mkcd foo'
example '$ mkcd /tmp/img/photos/large' 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' group 'base'
mkdir -p -- "$*" mkdir -p -- "$@" && eval cd -- "\"\$$#\""
cd -- "$*"
} }
function lsgrep () function lsgrep ()