mirror of
https://github.com/duncs/clusterssh.git
synced 2025-06-30 00:34:04 +00:00
Fix for multiple range expansion
Allow ranges such as 'h{a,b}{1,2}' to expand to 'ha1 ha2 hb1 hb2' rather than return a perl error Thanks to Markus Frosch (lazyfrosch). Github issue #97.
This commit is contained in:
parent
f2194ecdfa
commit
93432c1580
5 changed files with 8 additions and 2 deletions
3
Changes
3
Changes
|
@ -1,3 +1,6 @@
|
||||||
|
4.10_03 ????-??-?? Duncan Ferguson <duncan_ferguson@user.sf.net>
|
||||||
|
- Fix for multiple range expansion, as in 'h{a,b}{1,2}' (Github issue #97) (Thanks to lazyfrosch)
|
||||||
|
|
||||||
4.10_02 2017-08-08 Duncan Ferguson <duncan_ferguson@user.sf.net>
|
4.10_02 2017-08-08 Duncan Ferguson <duncan_ferguson@user.sf.net>
|
||||||
- Include coverage tests in the resources
|
- Include coverage tests in the resources
|
||||||
- Include the version of cssh in the utility documentation and README
|
- Include the version of cssh in the utility documentation and README
|
||||||
|
|
1
THANKS
1
THANKS
|
@ -47,3 +47,4 @@ Deny Dias
|
||||||
Bill Rushmore
|
Bill Rushmore
|
||||||
Ankit Vadehra
|
Ankit Vadehra
|
||||||
Azenet
|
Azenet
|
||||||
|
Markus Frosch (lazyfrosch)
|
||||||
|
|
|
@ -3,7 +3,7 @@ package App::ClusterSSH;
|
||||||
use 5.008.004;
|
use 5.008.004;
|
||||||
use warnings;
|
use warnings;
|
||||||
use strict;
|
use strict;
|
||||||
use version; our $VERSION = version->new('4.10_02');
|
use version; our $VERSION = version->new('4.10_03');
|
||||||
|
|
||||||
use Carp qw/cluck :DEFAULT/;
|
use Carp qw/cluck :DEFAULT/;
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ sub expand {
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
my ( $base, $spec ) = $item =~ m/^(.*?\{(.*)\}.*?)$/;
|
my ( $base, $spec ) = $item =~ m/^(.*?\{(.*?)\}.*?)$/;
|
||||||
|
|
||||||
for my $section ( split( /,/, $spec ) ) {
|
for my $section ( split( /,/, $spec ) ) {
|
||||||
my ( $start, $end );
|
my ( $start, $end );
|
||||||
|
|
|
@ -23,6 +23,8 @@ my %tests = (
|
||||||
'l{0..2,7..9,e..g}' => 'l0 l1 l2 l7 l8 l9 le lf lg',
|
'l{0..2,7..9,e..g}' => 'l0 l1 l2 l7 l8 l9 le lf lg',
|
||||||
'm{0,1}' => 'm0 m1',
|
'm{0,1}' => 'm0 m1',
|
||||||
'n0..2}' => 'n0..2}',
|
'n0..2}' => 'n0..2}',
|
||||||
|
'host{a,b}-test{1,2}' =>
|
||||||
|
'hosta-test1 hosta-test2 hostb-test1 hostb-test2',
|
||||||
|
|
||||||
# NOTE: the following are not "as expected" in line with above tests
|
# NOTE: the following are not "as expected" in line with above tests
|
||||||
# due to bsd_glob functionality. See output from:
|
# due to bsd_glob functionality. See output from:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue