Comment by tgbugs
4 years ago
Word of warning from hard experience: rn is a really dangerous thing to name a function because it is one char away from rm.
4 years ago
Word of warning from hard experience: rn is a really dangerous thing to name a function because it is one char away from rm.
One char away also physically on the keyboard (maybe that's what you meant?).
Yeah, the physical layout is the primary concern. I should have noted that since there is ambiguity because n and m also happen to be next to each other in the alphabet.
laughs in dvorak
1 reply →
I once ran “crontab -r” instead of “crontab -e” and also thought that was terrible design for the same reason.
Looks like it's typically run without any arguments, so it's probably fine.
A typo can go the other way, like "rn somefile" where it was meant to remove a file but instead it renames all files.
Agree. Having this function exit if any arguments are passed to it seems like a good safety measure.
ren would be better than rn. :)
Note to self: snag “notTerseAtAllMoreVerboseIdentifiersForGreatGood.js” on NPM