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

prevent reordering with cluset -e #410

Open
brianjmurrell opened this issue Jul 23, 2019 · 4 comments
Open

prevent reordering with cluset -e #410

brianjmurrell opened this issue Jul 23, 2019 · 4 comments

Comments

@brianjmurrell
Copy link

$ cluset -e wolf-100vm3,wolf-122,wolf-123,wolf-124,wolf-125,wolf-126,wolf-127,wolf-128,wolf-129
wolf-122 wolf-123 wolf-124 wolf-125 wolf-126 wolf-127 wolf-128 wolf-129 wolf-100vm3

An option to not reorder the list would be useful as It could be that particular positions in the list (i.e. first, last, etc. are meaningful and that they should remain where they were in the input.

@brianjmurrell
Copy link
Author

I suppose a more useful example would be:

$ cluset -e wolf-100vm3,wolf-[122-129]
wolf-122 wolf-123 wolf-124 wolf-125 wolf-126 wolf-127 wolf-128 wolf-129 wolf-100vm3

to demonstrate why I want to use cluset in the first place.

@degremont
Copy link
Collaborator

And would you expect from the following command?

$ cluset -e wolf-[122-129],wolf-[120-122]

@brianjmurrell
Copy link
Author

The existing behaviour for that is fine:

wolf-122 wolf-123 wolf-124 wolf-125 wolf-126 wolf-127 wolf-128 wolf-129

So generally speaking I would say expanding left to right, maintaining order, suppressing any duplicates along the way.

@degremont
Copy link
Collaborator

expanding left to right, maintaining order,

That's not exactly my example :). In my example, the elements are not ordered. (120 comes after 122).

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

No branches or pull requests

3 participants