$ mv --help
Usage: file [OPTION...] [FILE...]
Determine type of FILEs.
So mv --help now returns the help for the `file` command. You're right, that's not worth warning people at all.God help any user that's on a shared system whose sysadmin thinks this is a good idea putting in the default /etc/profile.
To be fair, I don't feel like I'm being pedantic. I'm anti-footgun.
Well that, I agree, would be dumb.
I like this kind of thing! Minimal code but very elegant from a UX perspective. The oh but you could just mv foo-{bar,baz}.txt crowd is completely missing the point.
I disagree. I think a better way to think about things is, "can I accomplish my goal most of the time using the standard tools without writing something custom?" I'll be the first to admit that there are a ton of things in the shell and in coreutils that I don't know about. I bet I've written several scripts over the years with custom functionality that could be replaced with standard tools I didn't know about. That's the thing that I want to avoid.
But please please please please with all the love of America, baseball, and apple pie, don't change the default behavior of basic unix commands.
Otherwise you force people into writing nonsense like this:
MV=/usr/bin/mv
${MV} ${FILE1} ${FILE2}
I think you're reading way too much into what I and others are saying. Honestly I'm finding being misunderstood and mis-characterized as angry to be the only thing that's bothering me.
Maybe. It's worthwhile pointing out that "mv x" with no second argument is an error:
I also don't have the habit of letting people type in my shell, so there's that.TBH I really don't understand the level of pedantry (and frankly, sheer outrage) in this thread at all. It sucks to be on the receiving end of such disapproval over something so trivial. Let this person do what they want! It's a neat little hack. It also inspired me to see what more I could do with 'read'--something I have ignored for 20 years.