-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to change the case of a pattern? #17
Comments
which OS are you on, i assume you're on a case-insensitive OS (Mac or Windows)? |
OSX Yosemite. Yeah, it's case-insensitive, but that actually doesn't matter in this case. Context: I'm using grunt spritesmith to generate a spritesheet of a bunch of images, and it uses the filenames to generate CSS classes, and it preserves the casing of the filenames. |
this boils down to case-insensitivity at the OS level.. node essentially considers these two files the same, thus renamer doesn't think there's any work to do..
i'm flippin starving now but will fix it later! |
I was able to do it with pure bash, though it wasn't easy because of the filesystem case-insensitivity. It kept thinking I was moving a file to the exact same name and wouldn't let me, so I had to move them to a temp directory as I lower cased them, and then move them back. Anyway, the point is, it's not urgent for me. I have the files now in the form I need them. But something like |
I always keep my project files in a case sensitive partition, this would be pretty handy to have +1 |
I thought that a solution could be a "pre defined function" argument (--fn/-s) to identify a function (maybe from string.js -- humanize, camelize, dasherize, etc) to receive the fileName after replacements. It could solve this and be a useful feature. What do you think? |
@wellguimaraes yeah, would be useful to have the option to pass in a custom transform function if the built-in case-insensitive rename didn't cover your needs.. that will likely go in the next version. |
It's now possible to change a file's case in renamer v1.0.0 (prerelease available here). On case-insensitive systems, this command (renaming
In renamer v1, you can override this by passing
Version 1 is still in prerelease so feedback welcome at this stage! |
fixed and released in renamer v1.0.0. @wellguimaraes , there's a new plugin to achieve what you suggested here. |
E.g. I would like to convert "FooBar.txt" to "foobar.txt" on many files.
The text was updated successfully, but these errors were encountered: