kingToolbox / kingToolbox/WindTerm

对于cmd/powershell会话,clear清屏不能重置命令行数 | For cmd/powershell sessions, clear screen cannot reset the number of command lines

Open
#2,025 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
32.3k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

系统环境:Windows10 22H2
软件版本:WindTerm 2.5.0

问题描述:
对于ssh会话,clear可以将历史操作记录清空,行号清零。但当使用cmd或powershell会话时,cls或clear命令虽然也能清屏,但行号不会重置,而是继续累加。想要重置命令行号只能彻底关闭当前会话再新建一个。
For ssh sessions, clear can clear the historical operation records and clear the line numbers to zero. But when using cmd or powershell session, although the cls or clear command can also clear the screen, the line number will not be reset, but will continue to accumulate. If you want to reset the command line number, you can only completely close the current session and create a new one.
![image](https://github.com/kingToolbox/WindTerm/assets/71303795/d6ea67a5-2965-42f1-94a7-a4822b2e4f38)

而直接win+r运行cmd或者powershell,使用clear清屏命令是可以清空并重置操作记录的,所以应该不是原生命令不支持?
And directly run cmd or powershell with win+r, and use the clear screen command to clear and reset the operation records, so it shouldn't be that the native command is not supported? Is that a problem?
![image](https://github.com/kingToolbox/WindTerm/assets/71303795/0e5b9125-d81a-4f42-817d-04226519ec0b)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the behavior in a Windows cmd or PowerShell session and compare it with the SSH session behavior described in the report. Trace how clear or cls is handled for these session types; done means clearing the screen also resets the command-line number without closing and recreating the session.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.