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

[FeatureRequest] Case-insensitive file name lexicographical orderings #258

Open
jcbrill opened this issue Oct 17, 2024 · 0 comments
Open

Comments

@jcbrill
Copy link

jcbrill commented Oct 17, 2024

It would be useful to have case-insensitive file name lexicographical orderings for systems where the default file system is case-insensitive (e.g., Windows).

Feel free to close this issue if not applicable and/or desirable.

Version:

erd.exe -V
erdtree 3.1.2

Lexicographical order demonstration:

erd.exe -C none -s name --dir-order last -y inverted --suppress-size ..\Test-Tree
 Test-Tree
 ├─ AbcdefB
 ├─ AbcdefZ
 ├─ abcdefa
 ├─ abcdefm
 ├─ AbcdefB.txt
 ├─ AbcdefZ.txt
 ├─ abcdefa.txt
 └─ abcdefm.txt

4 directories, 4 files

Windows cmd.exe dir command (sort by name alphabetic):

dir /b /ON ..\Test-Tree
abcdefa
abcdefa.txt
AbcdefB
AbcdefB.txt
abcdefm
abcdefm.txt
AbcdefZ
AbcdefZ.txt

Windows cmd.exe dir command (group directories first, sort by name alphabetic):

dir /b /OGN ..\Test-Tree
abcdefa
AbcdefB
abcdefm
AbcdefZ
abcdefa.txt
AbcdefB.txt
abcdefm.txt
AbcdefZ.txt

Sample options for case-insensitive lexicographical order:

  • nameci: Sort entries by file name in lexicographical order (case-insensitive)
  • rnameci: Sort entries by file name in reverse lexicographical order (case-insensitive)

Mock-up of example usage and output:

erd.exe -C none -s nameci --dir-order last -y inverted --suppress-size
 Test-Tree
 ├─ abcdefa
 ├─ AbcdefB
 ├─ abcdefm
 ├─ AbcdefZ
 ├─ abcdefa.txt
 ├─ AbcdefB.txt
 ├─ abcdefm.txt
 └─ AbcdefZ.txt

The directories first, and case-insensitive name sorting is typically the default in Windows File Explorer and other file managers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant