} else if (commandLine.getCommandName() != null) {
alias = commandLine.getCommandName();
} else {
alias = "help";
}
CommandShell shell = null;
try {
shell = (CommandShell) ShellUtils.getShellManager().getCurrentShell();
CommandInfo cmdInfo = shell.getCommandInfo(alias);
Help cmdHelp = HelpFactory.getHelpFactory().getHelp(alias, cmdInfo);
if (cmdHelp == null) {
err.format(err_no_help, alias);
exit(1);
}
cmdHelp.help(out);
otherAliases(shell.getAliasManager(), alias, cmdInfo.getCommandClass().getName(), out);
} catch (HelpException ex) {
err.format(err_help_ex, alias, ex.getLocalizedMessage());
throw ex;
} catch (ShellException ex) {
err.println(ex.getMessage());