Mercurial > hg > config
changeset 544:ed193fcaa0dc
wip
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Thu, 17 Oct 2013 04:37:17 -0700 (2013-10-17) |
parents | f9614844e872 |
children | 9cf7d5cc9c2b |
files | .bash_overrides |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/.bash_overrides Sun Sep 29 08:51:51 2013 -0700 +++ b/.bash_overrides Thu Oct 17 04:37:17 2013 -0700 @@ -126,6 +126,24 @@ } +function mv { + num=$# + if (( num == 0 )) + then + command mv "$@" + return + fi + last=${!#} + directory=$(dirname ${last}) + if [[ ! -e "${directory}" ]] + then + mkdir -p "${directory}" + fi + command mv "$@" + return + +} + function unlink { command unlink `echo $@ | sed 's/\/$//g'` }