how does grouping work? #11

Closed
opened 2019-02-23 17:12:51 +00:00 by zlax · 2 comments
Owner

Author: @fauzie

Not mentioned in the readme and on -h. And quite confused for its use. Because I have several server clusters.
How do I add an alias to a group?
Or, what is the correct sshch.conf syntax for group members?
What is the difference between the host that has or not in the group in the sshch window?
Will the member group also be in bash autocompletion?

Thank you for developing such this great tool 👍

Author: @fauzie Not mentioned in the readme and on `-h`. And quite confused for its use. Because I have several server clusters. How do I add an alias to a group? Or, what is the correct `sshch.conf` syntax for group members? What is the difference between the host that has or not in the group in the sshch window? Will the member group also be in bash autocompletion? Thank you for developing such this great tool :+1:
Author
Owner

Author: @zlaxy

@fauzie
0. https://gitlab.com/zlax/sshch - please use this sources. It is version with bugfixes. On Microsoft Github i will update this repository with next release maybe.

How do I add an alias to a group?

In curses interface:

  1. Press g
  2. Enter groupname f.e. gr1 and press Enter
  3. Enter aliases of this group f.e. al1 al2 (Space is separator) and press Enter
    If aliases exist, they will appear in groups. If not, you can create those later.

In cmd interface, similarly:

  1. sshch -g gr2
  2. Enter aliases of this group f.e. al2 al3 al4 (Space is separator) and press Enter

It will be the result:
2019-02-23-221753_2560x1024_scrot

Or, what is the correct sshch.conf syntax for group members?

Correct sshsh.conf of this example:

[gr1]
group = al1 al2

[al1]
exec_string = ssh test

[al2]
exec_string = ssh test

[gr2]
group = al2 al3 al4

[al3]
exec_string = ssh test

[al4]
exec_string = ssh test

You can change the displayed order by editing this file.

Will the member group also be in bash autocompletion?

Yes.
In case of calling a command to be executed on a group of aliases, the command will be executed one by one on hosts, in the displayed order.

Thank you for developing such this great tool +1

Please close this issue if i answered to your questions.

Author: @zlaxy @fauzie 0. https://gitlab.com/zlax/sshch - please use this sources. It is version with bugfixes. On Microsoft Github i will update this repository with next release maybe. > How do I add an alias to a group? In curses interface: 1. Press `g` 2. Enter groupname f.e. `gr1` and press `Enter` 3. Enter aliases of this group f.e. `al1 al2` (`Space` is separator) and press `Enter` If aliases exist, they will appear in groups. If not, you can create those later. In cmd interface, similarly: 1. `sshch -g gr2` 2. Enter aliases of this group f.e. `al2 al3 al4` (`Space` is separator) and press `Enter` It will be the result: ![2019-02-23-221753_2560x1024_scrot](https://user-images.githubusercontent.com/19224533/53290707-04c4e200-37b9-11e9-910d-54696159b218.png) > Or, what is the correct `sshch.conf` syntax for group members? Correct `sshsh.conf` of this example: ``` [gr1] group = al1 al2 [al1] exec_string = ssh test [al2] exec_string = ssh test [gr2] group = al2 al3 al4 [al3] exec_string = ssh test [al4] exec_string = ssh test ``` You can change the displayed order by editing this file. > Will the member group also be in bash autocompletion? Yes. In case of calling a command to be executed on a group of aliases, the command will be executed one by one on hosts, in the displayed order. > Thank you for developing such this great tool +1 Please close this issue if i answered to your questions.
Author
Owner

Author: @fauzie

thank you very much.

Author: @fauzie thank you very much.
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: zlax/sshch#11
No description provided.