Skip to content

Commit

Permalink
Added clear command.
Browse files Browse the repository at this point in the history
  • Loading branch information
coreybutler committed May 9, 2020
1 parent 467754d commit ea354cc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,12 @@ export default class Shell extends Base {

return results.flat(Infinity)
}

// Clear the terminal
clear () {
console.clear()
// .write('\x1b[0f') // regular clear
// .write('\x1b[2J') // full clear
// .write('\033[0;0f') //ubuntu
}
}

0 comments on commit ea354cc

Please sign in to comment.