completionInstallationOverview function
Short installation instructions for all shells, one line per shell,
under a heading. Used in the usage of the completion command.
Implementation
String completionInstallationOverview(
final String executableName, {
final bool viaOption = false,
final String heading = 'Installation:',
}) {
const labelWidth = 12;
return [
heading,
for (final shell in CompletionShell.values)
' ${'${shell.displayName}:'.padRight(labelWidth)} '
'${shell.installInstruction(executableName, viaOption: viaOption)}',
].join('\n');
}