go-internal icon indicating copy to clipboard operation
go-internal copied to clipboard

`mv` files into a directory the same way you can with `cp`

Open bitfield opened this issue 2 years ago • 1 comments

I realise this applies to upstream too: it's a little confusing that you can't mv files into a directory the same way you can with cp:

mkdir new

# works
cp a.txt b.txt new

# doesn't work
mv a.txt b.txt new

-- a.txt --
-- b.txt -- 

Originally posted by @bitfield in https://github.com/rogpeppe/go-internal/issues/153#issuecomment-1214141013

To be clear, I'm not saying I have a convincing use case for this. It's just that, over many years and hundreds of students, I've developed a nose for what will confuse people trying to learn things.

I can already hear someone asking "Oh, cp works like Unix cp, so mv works like Unix mv?" Oh, my sweet, summer child.

bitfield avatar Aug 15 '22 09:08 bitfield

I agree. Want to send a patch?

mvdan avatar Aug 22 '22 08:08 mvdan