Re:I'm “still afraid to use spaces in file names” years old
by tgbugs on Thursday November 11, 2021 @12:45PM
(#29190767)
Word of warning from hard experience: rn is a really dangerous thing to name a function because it is one char away from rm.
[ Parent
| on HN ]
Re:I'm “still afraid to use spaces in file names” years old
by spurgu on Thursday November 11, 2021 @01:24PM
(#29191189)
One char away also physically on the keyboard (maybe that's what you meant?).
Re:I'm “still afraid to use spaces in file names” years old
by tgbugs on Thursday November 11, 2021 @02:15PM
(#29191882)
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.
Re:I'm “still afraid to use spaces in file names” years old
by jatone on Thursday November 11, 2021 @07:17PM
(#29194932)
laughs in dvorak
Re:I'm “still afraid to use spaces in file names” years old
by kataklasm on Friday November 12, 2021 @04:48AM
(#29197720)
cries in colemak
Re:I'm “still afraid to use spaces in file names” years old
by Extigy on Thursday November 11, 2021 @03:47PM
(#29192943)
I once ran “crontab -r” instead of “crontab -e” and also thought that was terrible design for the same reason.
Re:I'm “still afraid to use spaces in file names” years old
by post-it on Thursday November 11, 2021 @01:23PM
(#29191177)
Looks like it's typically run without any arguments, so it's probably fine.
Re:I'm “still afraid to use spaces in file names” years old
by lioeters on Thursday November 11, 2021 @02:13PM
(#29191861)
A typo can go the other way, like "rn somefile" where it was meant to remove a file but instead it renames all files.
Re:I'm “still afraid to use spaces in file names” years old
by itsbenweeks on Tuesday November 16, 2021 @09:13AM
(#29240723)
Agree. Having this function exit if any arguments are passed to it seems like a good safety measure.
Re:I'm “still afraid to use spaces in file names” years old
by TheSkyHasEyes on Thursday November 11, 2021 @01:04PM
(#29190970)
ren would be better than rn. :)
Re:I'm “still afraid to use spaces in file names” years old
by eyelidlessness on Thursday November 11, 2021 @11:14PM
(#29196248)
Note to self: snag “notTerseAtAllMoreVerboseIdentifiersForGreatGood.js” on NPM