mirror of
https://github.com/duncs/clusterssh.git
synced 2025-04-21 09:09:06 +00:00
Allow dashes in hostname when expanding in ranges
Hostname characters allowed here are currently any alpha-numberic, underscores and dashes. Github issue #89
This commit is contained in:
parent
2b9b8990b7
commit
fa01db1a03
3 changed files with 6 additions and 1 deletions
1
Changes
1
Changes
|
@ -1,6 +1,7 @@
|
|||
4.10_02 0000-00-00 Duncan Ferguson <duncan_ferguson@user.sf.net>
|
||||
- Include coverage tests in the resources
|
||||
- Include the version of cssh in the utility documentation and README
|
||||
- Fix dashes (-) not being accepted in hostname range expansion (Github issue #89)
|
||||
|
||||
4.10_01 2017-04-12 Duncan Ferguson <duncan_ferguson@user.sf.net>
|
||||
- Allow 'include' directives when reading SSH configuration files (Github issue #77) (thanks to Azenet)
|
||||
|
|
|
@ -54,7 +54,7 @@ Ranges are of the form:
|
|||
sub expand {
|
||||
my ( $self, @items ) = @_;
|
||||
|
||||
my $range_regexp = qr/^\w+\{[\w\.,]+\}$/;
|
||||
my $range_regexp = qr/^[\w-]+\{[\w\.,]+\}$/;
|
||||
my @newlist;
|
||||
foreach my $item (@items) {
|
||||
if ( $item !~ m/$range_regexp/ ) {
|
||||
|
|
|
@ -29,6 +29,10 @@ my %tests = (
|
|||
# print join(q{ }, bsd_glob("o{a,b,c")).$/
|
||||
'o{a,b,c' => 'o',
|
||||
'p{0..2' => 'p',
|
||||
|
||||
# Reported as bug in github issue #89
|
||||
'q-0{0,1}' => 'q-00 q-01',
|
||||
'q-0{0..1}' => 'q-00 q-01',
|
||||
);
|
||||
|
||||
my $range = App::ClusterSSH::Range->new();
|
||||
|
|
Loading…
Add table
Reference in a new issue