Skip to content
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

scripts: add get_filelist() #490

Closed
wants to merge 1 commit into from
Closed

scripts: add get_filelist() #490

wants to merge 1 commit into from

Conversation

gperciva
Copy link
Member

No description provided.

@gperciva
Copy link
Member Author

This includes #488 and #489.

This standardizes on sorting the list of filenames when we generate them, instead of when we use them.

Having to use set -o noglob inside the subshell is unfortunate. I was initially tempted to avoid that by keeping everything on one line (instead of using a function), but that got unwieldly with the switch from ls to find.

@gperciva gperciva force-pushed the scripts-filelist branch 3 times, most recently from d2ef6a3 to 1d52d9d Compare June 30, 2023 00:33
@gperciva gperciva force-pushed the scripts-filelist branch 2 times, most recently from caf432c to d8571be Compare August 15, 2023 16:05
This does not support filenames which contain newlines, as that would
make the scripts significantly more complicated.

Newlines aren't part of the POSIX Portable Filename Character Set.
The GNU style of using null-separated lists is interesting, but it's not
part of POSIX so it's not portable.

References:
- https://dwheeler.com/essays/fixing-unix-linux-filenames.html
- Use `find` instead of `ls` to better handle non-alphanumeric filenames.
  https://www.shellcheck.net/wiki/SC2012
@cperciva
Copy link
Member

I'm not sure I understand why you can't use ls here..

@gperciva gperciva marked this pull request as draft August 16, 2023 20:51
@gperciva
Copy link
Member Author

Hmm. The more I read about this, the less confident I am in the original PR.

@gperciva gperciva closed this Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants