From 43c976edb92a8f2fe25f45894a5d924584909203 Mon Sep 17 00:00:00 2001 From: HeXiangLong <3234374354@qq.com> Date: Wed, 2 Apr 2025 18:36:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20main.py=EF=BC=8C=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20PyShell=20=E7=9B=AE=E5=BD=95=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=B9=B6=E7=AE=80=E5=8C=96=E7=BB=88=E7=AB=AF?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E6=A0=87=E9=A2=98=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index aee3259..622be4e 100644 --- a/main.py +++ b/main.py @@ -34,7 +34,7 @@ def pseudo_zsh(): else: CmdDir = dir.split('/')[-1] - if CmdDir == 'PyShell' : + if dir.split('/')[-1] == 'PyShell' : CmdDir == '~/' # 显示提示符并获取用户输入 @@ -82,7 +82,7 @@ def pseudo_zsh(): print(f"zsh: command not found: {args[0]}") # 修改终端窗口标题 - sys.stdout.write(f"\033]0;{CmdDir}-zsh\007") # 使用 ANSI 转义序列设置标题 + sys.stdout.write(f"\033]0;zsh\007") # 使用 ANSI 转义序列设置标题 sys.stdout.flush() except KeyboardInterrupt: print(f"^C")