Re: cg-mv
On Wednesday 12 October 2005 12:07, Petr Baudis wrote:
Show 12 quoted lines
> so it should keep the file under the original name as well, but
> untraced? That's weird. What about
>
> #!/usr/bin/env bash
>
> if [ -e $2 ]; then
> ! got_parameter -f && die "dest exists"
> [ -e $1 ] || die "no source nor destination"
> fi
> ( [ -e $1 ] && mv $1 $2 ) && cg-add $2 && cg-rm $1
>
> plus quoting and stuff?
Wishlist...
Please make it similar to mv:
* Rename directories, too
* If last argument is an existing directory
move given files/directories into that directory
Josef