How to alias 'clear' to CTRL+L keystroke

alias, bash

Solution

`clear` clears the screen simply by outputting some ANSI escapes sequences. You can do the same thing with `printf`:

alias clear='printf "\e[H\e[2J"'

Problem

I have a habit of issuing the `clear` command. When I run cygwin, the package containing `clear` isn't installed and I don't have the option of installing it. Ctrl+L is a good substitute; however, I still issue the `clear` command habitually. I'd like to alias the `clear` keyword to issue the Ctrl+L keystroke. Is this possible to achieve in the `.bashrc` file, or something of the like? Thanks!

Original source