#!/bin/zsh

# wrapper for mv; for the given target, create any dirs which do not already exist
mvd_target_dir=$(dirname "${@: -1}")
[[ ! -d "$mvd_target_dir" ]] && mkdir -p "$mvd_target_dir"
exec mv "$@"
