cygwin clearscreen from bash

前端 未结 7 821
说谎
说谎 2021-01-30 21:00

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

7条回答
  •  南方客
    南方客 (楼主)
    2021-01-30 21:29

    I have this in my ~/.bashrc:

    alias clear='printf "\033c"'
    

    likewise, printf "\033c" clears the screen from within a bash script.

提交回复
热议问题