我想知道是否有办法设置linux或mac终端,这样你总是在终端屏幕的顶部输入命令,而以前的命令在它下面。
实施例
-----Screen top----
>EnterCommand
>PreviousCommand 1
>final line of Previous Command 1 output
>second to final line of previous command 1 output
-----Bottom of screen-----
谢谢!
答案 0 :(得分:0)
此类功能未内置于standard *nix terminal driver;必须专门编写终端应用程序以将换行符和换行转换为向上运动而不是向下运动。请注意,这可能会破坏许多TUI个应用程序,因此不建议将它们与这样的终端应用程序一起使用。
答案 1 :(得分:0)
这似乎与你要求的非常接近:
https://github.com/swirepe/alwaysontop
使用它运行:
git clone https://github.com/swirepe/alwaysontop.git
cd alwaysontop/
source alwaysontop.sh
如果你决定喜欢它,只需在你的.bashrc或.bash_profile中找到它:
echo "source ~/alwaysontop/alwaysontop.sh" >> ~/.bashrc
希望有所帮助!