Skip to content

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

Description

@jcbrill

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions