From 1422737150421d1a848a134257ba5d8bd53ef5f9 Mon Sep 17 00:00:00 2001 From: HeXiangLong <3234374354@qq.com> Date: Wed, 2 Apr 2025 14:02:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E4=BC=AA=20Zsh=20=E4=B8=AD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=B8=85=E5=B1=8F=E5=8A=9F=E8=83=BD=E5=92=8C=E6=9C=80?= =?UTF-8?q?=E5=90=8E=E7=99=BB=E5=BD=95=E6=97=B6=E9=97=B4=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 6411f89..6fa0d07 100644 --- a/main.py +++ b/main.py @@ -21,6 +21,9 @@ def pseudo_zsh(): sys.stdout.write("\033]0;zsh\007") # 使用 ANSI 转义序列设置标题 sys.stdout.flush() + os.system("clear") # 清屏 + print(f"Last login: {datetime.now().strftime('%a %b %d %H:%M:%S %Y')} on ttys000\n") + while True: try: dir = os.getcwd() @@ -75,7 +78,7 @@ def pseudo_zsh(): except FileNotFoundError: print(f"zsh: command not found: {args[0]}") except KeyboardInterrupt: - print("\nUse 'hxl' to exit.") + break except EOFError: break