All file names to lower case

Open
#60 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
30/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Active
Tech stack
shell, swift
Domain
desktop

Research direction

The payload names no files, so start from the project's README or getting-started docs and look for how a script action receives files, either one at a time or as a batch. The open question is whether Forel passes file paths or bare names. Done means a documented example rule that lowercases file names and replaces spaces with underscores, confirmed by running it on a folder with mixed-case names and spaces.

Written by the indexing model from the issue text.

Description

help wanted

As I haven't found a Get Started with examples, I place my question here. On macOS, how can establish a rule which automatically renames all files to lower case and replaces spaces with underscores?

I have seen

for f in *; do mv "$f" "$f.tmp"; mv "$f.tmp" "`echo $f | tr "[:upper:]" "[:lower:]"`"; done

in https://stackoverflow.com/a/7787159/20002111 and, hence, have thought

[ Run script ] [ for f in *; do mv "$f" "$f.tmp"; mv "$f.tmp" "`echo $f | tr "[:upper:]" "[:lower:]" tr " " "_"`"; done ]

would be all I need, but it looks suspect. Does Forel pass files or file names? A single one or all at once?

Anyways, thank you very much for sharing this promosing tool with us!

Dominant language
Swift
Stars
757
Forks
23
Avg merge
1d 5h
Merged PRs (30d)
9

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lab421/forel

All issues in lab421/forel

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.