A tiny zsh plugin providing mkcd, the canonical mkdir && cd helper.
Inspired by the common mkdir && cd pattern.
mkcd foo/bar
mkcd ~/projects/appCreates the directory recursively if it does not exist, then changes into it.
mkdir -p ~/.local/share/zsh-plugins && curl -o ~/.local/share/zsh-plugins/mkcd.plugin.zsh https://raw.githubusercontent.com/azizoid/zsh-mkcd/main/mkcd.plugin.zshAdd to your ~/.zshrc:
source ~/.local/share/zsh-plugins/mkcd.plugin.zshRestart your shell or run source ~/.zshrc.
Oh My Zsh:
mkdir -p ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/mkcd && curl -o ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/mkcd/mkcd.plugin.zsh https://raw.githubusercontent.com/azizoid/zsh-mkcd/main/mkcd.plugin.zshAdd mkcd to your plugins array in ~/.zshrc:
plugins=(... mkcd)Zinit:
zinit load azizoid/zsh-mkcdAntigen:
antigen bundle azizoid/zsh-mkcd-
Remove the source line from your
~/.zshrc:source ~/.local/share/zsh-plugins/mkcd.plugin.zsh
-
Optionally delete the plugin file:
rm ~/.local/share/zsh-plugins/mkcd.plugin.zsh -
Restart your shell.
Oh My Zsh:
Remove mkcd from your plugins array in ~/.zshrc, then:
rm -rf ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/mkcdZinit:
Remove the zinit load azizoid/zsh-mkcd line from your ~/.zshrc.
Antigen:
Remove the antigen bundle azizoid/zsh-mkcd line from your ~/.zshrc.
MIT