Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Put the 'feeds' command help text in sorted order #2201

Closed
kichalla opened this issue Jul 7, 2015 · 6 comments
Closed

Put the 'feeds' command help text in sorted order #2201

kichalla opened this issue Jul 7, 2015 · 6 comments

Comments

@kichalla
Copy link
Member

kichalla commented Jul 7, 2015

Looks like other commands are in sorted order:

image

@analogrelay
Copy link
Contributor

Perhaps this is just because I added it to the list of commands last? I think the main fix here is that dnu help should sort by command name and not rely on the order of insertion into the command list.

@glennc glennc added this to the Backlog milestone Aug 11, 2015
@jmloeffler
Copy link
Contributor

This seems like a good issue for someone like me, who is new to the project, to pick up and be productive while learning how everything fits together. I was thinking of implementing a IComparer and using it to sort the list prior to adding the commands to the StringBuilder in ShowHelp(). Does this seem reasonable? It's a bit side-affect-y since it would sort the list in place but structural solutions felt a little heavy for something that would only be used when ShowHelp() is called. I'd be happy to gist or pull-request what I'm proposing but figured it would be good to introduce myself and ask for guidance first, since this is my starter into the project.

@analogrelay
Copy link
Contributor

Sure! Sounds good! Please feel free to send us a PR. Thanks for checking in with us beforehand.

Sounds like you're on the right track, you'd basically just be adjusting the order here: https://github.com/aspnet/dnx/blob/dev/src/Microsoft.Framework.CommandLineUtils.Sources/CommandLine/CommandLineApplication.cs#L387

I don't think a comparer is needed, just a .OrderBy(c => c.Name) or something :)

@jmloeffler
Copy link
Contributor

Great suggestion. I was way overthinking it. :-)

@analogrelay
Copy link
Contributor

Heh, no worries :)

@davidfowl
Copy link
Member

Thanks for the PR @jmloeffler !

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

No branches or pull requests

5 participants