- @m = map { $match_cb->($_) } grep(
- m!\A(?:imaps?|nntps?|s?news)://!, $lms->folders);
- @f{@m} = @m;
+ @k = $lms->folders($argv[-1] // undef, 1);
+ @m = map { $match_cb->($_) } grep(m!\A[a-z]+://!, @k);
+ if (@m) { @f{@m} = @m } else { @f{@k} = @k }