print % if no eof from zsh

This commit is contained in:
b1ek 2023-03-16 14:25:41 +10:00
parent 755daf7c8d
commit a00a16e39d
Signed by: blek
GPG Key ID: 14546221E3595D0C
2 changed files with 4 additions and 4 deletions

View File

@ -26,10 +26,7 @@ module.exports = (argv, terminal) => {
terminal.write('\033[35m' + i + ' |\033[0m '); terminal.write('\033[35m' + i + ' |\033[0m ');
}) })
} else { } else {
terminal.write(file); terminal.write(lines.join('\n'));
/// print % if no newline at eof
if (lines[lines.length - 1] != '')
terminal.write('\033[30;47m%\033[0m\n');
} }
}) })
} }

View File

@ -69,6 +69,9 @@ function exec_cmd() {
if (cmds[command] != undefined) { if (cmds[command] != undefined) {
cmds[command](c.split(' '), terminal); cmds[command](c.split(' '), terminal);
if (terminal.buffer.active.cursorX != 0) {
terminal.write('\033[30;47m%\033[0m\n');
}
print_prompt(); print_prompt();
return; return;
} }