Con este script de ahí: https://codepen.io/isdampe/pen/YpgOYr
¿Cómo agrego un espacio a un comando? ¿Cómo hago que el comando "borre", por ejemplo, tiene que ser "borrar x" para que funcione? Porque, como tal, el script no acepta espacios para sus comandos.
Lo intenté :
function fauxTerm(config) { var term = config.el || document.getElementById('term'); var termBuffer = config.initialMessage || ''; var lineBuffer = config.initialLine || ''; var cwd = config.cwd || "~/"; var tags = config.tags || ['red', 'blue', 'white', 'bold']; var processCommand = config.cmd || false; var maxBufferLength = config.maxBufferLength || 8192; var commandHistory = []; var currentCommandIndex = -1; var maxCommandHistory = config.maxCommandHistory || 100; var autoFocus = config.autoFocus || false; var coreCmds = { "clear x": clear // only "clear" will be recognized, why? };Puedo crear comandos, pero no puedo crearlos con un espacio.