public static Shell createSubshell(String pathElement, Shell parent, String appName, Object mainHandler,
            MultiMap<String, Object> auxHandlers) {

        List<String> newPath = new ArrayList<String>(parent.getPath());
        newPath.add(pathElement);

        Shell subshell = new Shell(parent.getSettings().createWithAddedAuxHandlers(auxHandlers),
                new CommandTable(parent.getCommandTable().getNamer()), newPath);

        subshell.setAppName(appName);
        subshell.addMainHandler(subshell, "!");
        subshell.addMainHandler(new HelpCommandHandler(), "?");

        subshell.addMainHandler(mainHandler, "");
        return subshell;
    }
public static Shell createSubshell ( String pathElement , Shell parent , String appName , Object mainHandler , MultiMap < String , Object > auxHandlers ) { List < String > newPath = new ArrayList < String > ( parent . getPath ( ) ) ; newPath . add ( pathElement ) ; Shell subshell = new Shell ( parent . getSettings ( ) . createWithAddedAuxHandlers ( auxHandlers ) , new CommandTable ( parent . getCommandTable ( ) . getNamer ( ) ) , newPath ) ; subshell . setAppName ( appName ) ; subshell . addMainHandler ( subshell , "!" ) ; subshell . addMainHandler ( new HelpCommandHandler ( ) , "?" ) ; subshell . addMainHandler ( mainHandler , "" ) ; return subshell ; }
Facade method facilitating the creation of subshell.
Subshell is created and run inside Command method and shares the same IO and naming strategy.

Run the obtained Shell with commandLoop().

@param pathElement sub-prompt
@param parent Shell to be subshell'd
@param appName The app name string
@param mainHandler Command handler
@param auxHandlers Aux handlers to be passed to all subshells.
@return subshell