Comment by BiteCode_dev
4 years ago
Thanks to all the comments in this threads, I now have "sudo apt install rename detox" in my install script, and:
normalize_names() {
rename "s/-/_/g" *
detox -s lower *
}
in my .bashrc.
I've thrown some edge cases at it, and it handles it super well. It deals with consecutive "_", remove leading garbage, normalize unicode, and even prevents naming conflicts by opting out early.
Thanks you.
No comments yet
Contribute on Hacker News ↗