@Override
	public boolean preprocessCommand(JissModel jissModel, String orig, StringBuffer cmd) {
		final String c = cmd.toString();
		if(c.equals("::langs")) {
			cmd.setLength(0);
			printLangs(jissModel, cmd);
		} else if (c.equals("::lang")) {
			cmd.setLength(0);
			printCurrentLang(jissModel, cmd);
		} else if(c.startsWith("::lang")) {
			cmd.setLength(0);
			
			final String parts[] = c.split("\\p{Space}");
			if(parts.length == 2) {
				final String lang = parts[1];
				
				final ScriptEngineManager manager = new ScriptEngineManager(JissModel.class.getClassLoader());
				ScriptEngine newEngine = null;
				for(ScriptEngineFactory factory:manager.getEngineFactories()) {
					if(factory.getLanguageName().equals(lang)
							|| factory.getExtensions().contains(lang)
							|| factory.getMimeTypes().contains(lang)) {
						newEngine = factory.getScriptEngine();
						break;
					}
				}
				
				if(newEngine != null) {
					jissModel.setScriptEngine(newEngine);
					printCurrentLang(jissModel, cmd);
				}
			}
		}
		return false;
	}