diff --git a/react/resume/src/emulator/commands/cat.js b/react/resume/src/emulator/commands/cat.js index e330cc0..bdacf30 100644 --- a/react/resume/src/emulator/commands/cat.js +++ b/react/resume/src/emulator/commands/cat.js @@ -26,10 +26,7 @@ module.exports = (argv, terminal) => { terminal.write('\033[35m' + i + ' |\033[0m '); }) } else { - terminal.write(file); - /// print % if no newline at eof - if (lines[lines.length - 1] != '') - terminal.write('\033[30;47m%\033[0m\n'); + terminal.write(lines.join('\n')); } }) } \ No newline at end of file diff --git a/react/resume/src/emulator/zsh.js b/react/resume/src/emulator/zsh.js index 111fed1..49419aa 100644 --- a/react/resume/src/emulator/zsh.js +++ b/react/resume/src/emulator/zsh.js @@ -69,6 +69,9 @@ function exec_cmd() { if (cmds[command] != undefined) { cmds[command](c.split(' '), terminal); + if (terminal.buffer.active.cursorX != 0) { + terminal.write('\033[30;47m%\033[0m\n'); + } print_prompt(); return; }