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

Sort host list by name #34

Merged
merged 1 commit into from
Aug 23, 2017
Merged

Sort host list by name #34

merged 1 commit into from
Aug 23, 2017

Conversation

dilijev
Copy link
Collaborator

@dilijev dilijev commented Aug 2, 2017

No description provided.

Copy link
Owner

@bterlson bterlson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's wrong with always sorting? First-to-complete gets you results earlier potentially, but it feels like overkill to require an option for it...

@dilijev
Copy link
Collaborator Author

dilijev commented Aug 6, 2017

@bterlson Always sorting makes some kind of sense, but the default listing is in config-order which might be significant to the user. Didn't want to make that call necessarily.

By the way this isn't for running scripts. Those are now in alpha-sorted order by default when using --coalesce (see #29). This is for the --list option to display configured hosts.

@bterlson
Copy link
Owner

bterlson commented Aug 7, 2017

I think sorting always is fine, personally. I see it as the moral equivalence of git branch sorting branch names (rather than doing creation order or something). @rwaldron any preferences?

@rwaldron
Copy link
Collaborator

rwaldron commented Aug 7, 2017

When I reviewed this last week I thought a bit about the sorting and wondered whether a user might also want to sort by other columns (by providing the column name) and I spent sometime sketching that out; but ultimately I decided against pursuing it and reasoned that if eshost-cli wanted to grow that capability, then it could without an issue and that this was a reasonable place to start, while also not that could be extended later.

But then...

I think sorting always is fine, personally. I see it as the moral equivalence of git branch sorting branch names

...is definitely compelling. So +1 to always sorting.

@dilijev
Copy link
Collaborator Author

dilijev commented Aug 8, 2017

Okay, always sorting is vastly simpler. I doubt the small audience of this tool is going to have someone whose workflow is broken by things being in a different order. I'll make the update soon.

@dilijev
Copy link
Collaborator Author

dilijev commented Aug 18, 2017

@bterlson lol one line change when it's not optional

@dilijev dilijev changed the title Teach --list the --sort option: sort host list by name Sort host list by name Aug 18, 2017
@rwaldron rwaldron merged commit 8d25a4e into bterlson:master Aug 23, 2017
@dilijev dilijev deleted the list-sort branch August 23, 2017 19:02
@dilijev dilijev mentioned this pull request Aug 24, 2017
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

Successfully merging this pull request may close these issues.

None yet

3 participants