function punch --description "Creates directories leading up to and including the file"
  
  set -l path (dirname $argv[1])

  mkdir -p $path
  touch $argv[1]
  
end
function punch --description "Creates directories leading up to and including the file"
  for file in $argv
    set -l path (dirname $file)
    mkdir -p $path
    touch $file
  end
end
Extend to work with multiple arguments
Extend to work with multiple arguments

adrianObel/dotfiles