Skip to content

Instantly share code, notes, and snippets.

@waldrupm
Created November 19, 2021 21:36
Show Gist options
  • Select an option

  • Save waldrupm/e8ef34e3f21b8ef062bdd571de3025b9 to your computer and use it in GitHub Desktop.

Select an option

Save waldrupm/e8ef34e3f21b8ef062bdd571de3025b9 to your computer and use it in GitHub Desktop.
ZSH touch2 function - mkdir and touch in one
function touch2() {
mkdir -p "$(dirname "$1")" && touch "$1";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment