#!/usr/bin/env zsh ################################################################################ # # This file is autoloaded by .zshrc, and actually loaded when executed # ################################################################################ # Create Directory and cd to it function mkcd () { if (( ARGC != 1 )); then printf 'usage: mkcd \n' >&2 return 1; fi if [[ ! -d "$1" ]]; then command mkdir -p "$1" || return 1 else printf '%s\n' "\`$1' already exists: cd-ing." fi builtin cd "$1" } # END OF FILE #################################################################