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

Example list is sorted differently on Windows and Linux #7

Open
alexrp opened this issue Dec 20, 2021 · 2 comments
Open

Example list is sorted differently on Windows and Linux #7

alexrp opened this issue Dec 20, 2021 · 2 comments

Comments

@alexrp
Copy link
Contributor

alexrp commented Dec 20, 2021

Repro:

$ git clone git@github.com:alexrp/system-terminal.git
$ cd system-terminal
$ dotnet example

Windows output:

$ dotnet example

┌──────────────┬─────────────┐
│ Example      │ Description │
├──────────────┼─────────────┤
│ attributes   │             │
│ cancellation │             │
│ cursor       │             │
│ extensions   │             │
│ hosting      │             │
│ processes    │             │
│ raw          │             │
│ resize       │             │
│ screens      │             │
│ scrolling    │             │
│ signals      │             │
│ width        │             │
└──────────────┴─────────────┘

Type dotnet example --help for help

Linux output:

$ dotnet example

╭──────────────┬─────────────╮
│ Example      │ Description │
├──────────────┼─────────────┤
│ processes    │             │
│ cursor       │             │
│ extensions   │             │
│ screens      │             │
│ scrolling    │             │
│ width        │             │
│ attributes   │             │
│ resize       │             │
│ hosting      │             │
│ cancellation │             │
│ signals      │             │
│ raw          │             │
╰──────────────┴─────────────╯

Type dotnet example --help for help
@patriksvensson
Copy link
Owner

@alexrp Yes, the order is up to how the OS enumerates files and directories.
If you want to set a specific order for your examples, you can set the <ExampleOrder> MSBuild property in your example.

i.e:

<ExampleOrder>5</ExampleOrder>

@alexrp
Copy link
Contributor Author

alexrp commented Dec 21, 2021

What do you think about sorting by name first and then by ExampleOrder?

I suspect a lot of people would like alphabetical sorting anyway, and maintaining ExampleOrder values across multiple projects to achieve that is a bit of a pain, especially in an evolving project. People who want a specific ordering could still override it as before.

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

2 participants