Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有发出clear命令的习惯。
clear
当我运行 cygwin 时,包含的软件包clear没有安装,我也没有安装它的选项。Ctrl+L是一个很好的替代品;clear但是,我仍然习惯性地发出命令。
我想给clear关键字起别名以发出Ctrl+L击键。这是否可以在.bashrc文件中实现,或者类似的东西?
.bashrc
谢谢!
clear只需输出一些 ANSI 转义序列即可清除屏幕。你可以做同样的事情printf:
printf
alias clear='printf "\e[H\e[2J"'