5 ms·
function ccd { mkdir -p "$1" && cd "$1" } Biggest timesaving script I've ever included in my arsenal.
by junon 4y ago
function ccd { mkdir -p "$1" && cd "$1" }
Biggest timesaving script I've ever included in my arsenal.
- cmg 4y agoI have this one aliased to mkcd, but yours saves an extra character. I like it!
- valbaca 4y agoadd in exec functionality and you've got xkcd!
- zeppelin101 4y agoZsh has the "take" command which accomplishes this.
- runjake 4y agoCorrection: Zsh does not have the take command. The Oh My Zsh add-on has the take command. (Lots of us don't use OMZ)
- amid11 4y agoDidn't know that! thank you
- zeppelin101 4y agoVery interesting - didn't know that. I always install OMZ after zsh.
- aslushnikov 4y agoI use `mkdir -p DIRECTORY_NAME && cd $_` in bash which is not as concise but still DRY.
- anjanb 4y agoI call it "mcd"(for make and cd) on my windows cmd and bash shells