Skip to content

Commit

Permalink
Grails Shell: Make Commands and Features displaying by order
Browse files Browse the repository at this point in the history
  • Loading branch information
rainboyan committed Jul 10, 2023
1 parent cf43ceb commit f245f73
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,24 +70,24 @@ class ProfileInfoCommand extends ArgumentCompletingCommand implements ProfileRep
}
else {
console.log("Profile: ${profile.name}")
console.log('--------------------')
console.log('-' * 80)
console.log(profile.description)
console.log('')
console.log('Provided Commands:')
console.log('--------------------')
Iterable<Command> commands = findCommands(profile, console).toUnique { Command c -> c.name }
console.log('-' * 80)
Iterable<Command> commands = findCommands(profile, console).sort { Command c -> c.name }.toUnique { Command c -> c.name }

for (cmd in commands) {
CommandDescription description = cmd.description
console.log("* ${description.name} - ${description.description}")
console.log("* ${description.name.padRight(30)} ${description.description}")
}
console.log('')
console.log('Provided Features:')
console.log('--------------------')
Iterable<Feature> features = profile.features
console.log('-' * 80)
Iterable<Feature> features = profile.features.sort { Feature f -> f.name }

for (feature in features) {
console.log("* ${feature.name} - ${feature.description}")
console.log("* ${feature.name.padRight(30)} ${feature.description}")
}
}

Expand Down

0 comments on commit f245f73

Please sign in to comment.