mirror of
https://github.com/duncs/clusterssh.git
synced 2025-04-22 01:12:24 +00:00
Added '--list', '-L'
Added option to list available cluster tags (idea from Markus Manzke)
This commit is contained in:
parent
e2cc9a0863
commit
2aa655b38d
3 changed files with 16 additions and 0 deletions
1
Changes
1
Changes
|
@ -1,5 +1,6 @@
|
|||
????-??-?? Duncan Ferguson <duncan_ferguson@user.sf.net> - v4.00_06
|
||||
* Fix test error on 5.8.8 (reported by Wei Wang)
|
||||
* Added '--list', '-L' to list available cluster tags (idea from Markus Manzke)
|
||||
|
||||
2010-06-20 Duncan Ferguson <duncan_ferguson@user.sf.net> - v4.00_05
|
||||
|
||||
|
|
4
bin/cssh
4
bin/cssh
|
@ -164,6 +164,10 @@ Specify the font to use in the terminal windows. Use standard X font notation.
|
|||
|
||||
Show basic help text, and exit
|
||||
|
||||
=item --list, -L
|
||||
|
||||
List available cluster tags.
|
||||
|
||||
=item --man,-H
|
||||
|
||||
Show full help test (the man page), and exit
|
||||
|
|
|
@ -87,6 +87,7 @@ my @options_spec = (
|
|||
'title|T=s',
|
||||
'output-config|u',
|
||||
'font|f=s',
|
||||
'list|L',
|
||||
);
|
||||
my %options;
|
||||
my %config;
|
||||
|
@ -414,6 +415,12 @@ sub dump_config {
|
|||
exit_prog if ( !$noexit );
|
||||
}
|
||||
|
||||
sub list_tags {
|
||||
print('Available cluster tags:',$/);
|
||||
print "\t", $_, $/ foreach (sort(keys(%clusters)));
|
||||
exit_prog;
|
||||
}
|
||||
|
||||
sub check_ssh_hostnames {
|
||||
return unless ( $config{method} eq "ssh" );
|
||||
|
||||
|
@ -2152,6 +2159,8 @@ sub run {
|
|||
|
||||
get_clusters();
|
||||
|
||||
list_tags() if ( $options{'list'} );
|
||||
|
||||
if (@ARGV) {
|
||||
@servers = resolve_names(@ARGV);
|
||||
}
|
||||
|
@ -2259,6 +2268,8 @@ the code until this time.
|
|||
|
||||
=item dump_config
|
||||
|
||||
=item list_tags
|
||||
|
||||
=item evaluate_commands
|
||||
|
||||
=item exit_prog
|
||||
|
|
Loading…
Add table
Reference in a new issue