10 月 192015
Source: cygwin clearscreen from bash
I want to clearscreen from bash in a cygwin terminal. I have tried
cmd /c cls
echo -e "^V^L"
echo -e "\014"
None of these work – they all give a “linefeed”. Pressing CTRL+L does work – but I want to call it from a Bash script.
Any ideas?
Answer:
There is two ways:
Using shortcuts
Alt+F8
to clear screen and Ctrl-L
to skip page
Using Clear
alias
- Go to:
cygwin\home\USER\.bashrc
- Open
.bashrc
file and put this aliasalias clear='printf "\033c"'
. - restart your cygwin terminal.
- to clear your screen use
clear
command.