Skip to content

Instantly share code, notes, and snippets.

@puglyfe
Last active April 3, 2018 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save puglyfe/5bec8e9f9dd8d1e5cb56fcb2e12fcaa7 to your computer and use it in GitHub Desktop.
Save puglyfe/5bec8e9f9dd8d1e5cb56fcb2e12fcaa7 to your computer and use it in GitHub Desktop.
create a folder and cd to it in one command
# Use: mkcd my-directory
function mkcd() {
if [ -n "$1" ]; then
mkdir "$1" && cd $_
else
echo "Must specify a directory to create"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment