The other day I was hacking on the fucking NERD tree trying to implement copying tree nodes (i.e. files/directories) in windows. Vimscript doesn't provide a function to copy files/directories so you have to shell out to do it. This is fine on *nix and osx where you can be sure legions of sweaty computer nerds are, even as we speak, busting out the TLC to improve the terminals/terminal apps. The same cannot be said for the windows terminal. This goes a long way toward explaining why its copying commands suck the spicy rod of beelzebub.
When I was writing the copying code, I was wanting to shell out to a single command for each OS that required no user input.
This is the copying command the NERD tree uses for *nix/osx
cp -r source destination
Clearly this needs to be much more complex and difficult. Good thing we have windows. Lets take a look at the windows copying commands!
The first one I looked at was
copy source destination
This is ok for files, but when
sourceis a directory it (most logically) copies the entire contents of that directory into a single file. That's understandable. The programmer who wrote the command was handicapped. I get it.
The second command I looked at was
xcopy /E source destination
This is almost good. Apart from the fact that the program is so abysmally fucking stupid that it has to ask you if
destinationshould be a directory or a file. Could the programmer who wrote
xcopypossibly be any more retarded? Let me put it like this: If a scientist was cloning a sheep for me and asked me whether said clone should be a sheep or a cow, I would take out my gun and strengthen the human gene pool by blowing his dumb ass out of it. Fuck you
xcopy, you fail.
Next on the list of candidate commands was something called
robocopy. Thankfully that wasn't even present on my install. Come on! "robocopy"!?! wtf, how many attempts does it take to make a program to copy stuff!?
I am aware that the windows terminal and all its shitty copying commands probably suck because they are complying to some standard or pseudo standard for backwards compatibility. I don't care, I'm still gonna hate on them, because they still suck sweaty ballsack.