mpssh icon indicating copy to clipboard operation
mpssh copied to clipboard

More flexibility with labels

Open JasonMaloney opened this issue 11 years ago • 1 comments

The first part of this request would be to add a new option:

-L, --no-label=LABEL        do not connect to hosts under label LABEL

The two label options would be mutually exclusive. I'll go ahead and submit a patch for this one soon.

The second part of the request would be to specify multiple labels for either option. For instance:

mpssh -l app -l db

or

mpssh -L dev -L internal

This one will take a bit longer.

I could also see someone wanting to mix the two options (all hosts in label A except for those also in label B), but at that point they should probably just make a new label.

JasonMaloney avatar Dec 14 '14 06:12 JasonMaloney

Upon further review, I neglected to account for the case in which a host may exist in more than one label; we would have to actually remove that host from the linked list if it's already there.

It may be beneficial to change the host list to a doubly-linked list to aid said deletions. I'm open to alternatives.

JasonMaloney avatar Dec 14 '14 07:12 JasonMaloney