[Feature] Some solution to wipe previous commands' output (besides clear, then CMD+K)
Terminal is often used to run unit and all other kinds of tests. Tests output lots of lines, spanning many screens. It's challenging to find, where old test's output ends and new one starts. By looking for the start of the previous command, user wastes precious mental resources.
Automated solution varies at the moment and is only partial:
- Bunch of
console.log("\n\n\n")(in JS) at the top of program can be inserted, which will give a gap among the lines in the terminal, making it easier to detect where last command started.
- Karabiner + Bash/ZSH + clicklick can be used to print something along the lines of
clear && cliclick "kd:cmd,shift" "t:k" && npm run test- we clear screen, then scrollback then run tests from blank.
While the second solution works, the programmatically-induced key presses happen later than the command was activated and if one switches screens and make other window active, characters can get typed there. Not nice.
What's more, it seems CMD+K alone is not enough to clear everything, first one must
clear then CMD+K to properly wipe everything. That's two different commands: one text, one key sequence. Is it optimal? Can we do better than this?
Let's do something to manage (reduce/limit/wipe) history/scrollback better.
- Maybe a toggle could let us customise the command
reset, does it wipe the scrollback (solving #4019 (closed)) or just clears (current behaviour)
- Maybe instead of tinkering with "reset" we could allow users to customise it to any word? For example, "wipe", like
wipe && npm run test
- Maybe we could add an option to wipe everything before any command typed, as if user typed
CMD+Kbefore every single command?
What do you think?