China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-07-31 21:21
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Another interesting phenomenon of CMD is discovered View 9,582 Replies 27
Original Poster Posted 2006-10-08 08:48 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline

Today, while playing with CMD, I accidentally discovered an interesting phenomenon of CMD. Maybe some friends have already noticed it.

I personally feel it is a small bug of CMD.

The process is as follows:

I first entered "cmd /d /f" in Start/Run to enter the command prompt. In order to enable the filename and directory auto-completion function. At this time, my command prompt is:

C:\Documents and Settings\Administrator>

Then press Ctrl+D casually to automatically complete a folder or file in the current directory at the current prompt position. At this time, my command prompt is:

C:\Documents and Settings\Administrator>「Start」menu

Then press the Tab key to make the cursor jump backward, and then keep pressing the BackSpace key until it can't be退. At this time, my command prompt has become:

C:\Documents and Settings\Administrato

Everyone should have discovered the problem.

Yes, the command prompt has changed. The original command prompt

C:\Documents and Settings\Administrator>

Now it has become

C:\Documents and Settings\Administrato

That is to say, after my operation just now, the command prompt lost the last two characters "r" and ">".

Then after pressing Enter, the command prompt returns to the original state.

Friends who are interested can try it by themselves. I have this strange phenomenon here. I don't understand the reason. I hope the experts can explain the reason for this phenomenon. I would like to thank you in advance, little brother.

I thought about it. It is very likely related to the "tab" function of the Tab key, but I can't be sure.

In addition, I tested in the root directory and there is no such phenomenon. I don't know if it's not fully tested or something.

Test environment: Windows XP SP2
Floor 2 Posted 2006-10-08 09:09 ·  中国 四川 南充 电信
超级版主
★★★★
我爱DOS
Credits 5,310
Posts 2,044
Joined 2005-09-26 12:00
20-year member
UID 42843
Gender Male
From 四川南充
Status Offline
Floor 3 Posted 2006-10-08 10:33 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
It may be related to the width of Chinese characters in cmd processing + Unicode encoding issues. If the first Ctrl+D is in English, there is no such problem

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 4 Posted 2006-10-08 10:42 ·  中国 广东 佛山 广东睿江科技有限公司
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
electronixtar's statement is correct. Please see a previous analysis article by willsort: CMD auto-complete feature has issues with Chinese file and directory names
尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。
Floor 5 Posted 2006-10-14 23:23 ·  中国 山东 淄博 联通
中级用户
★★
Credits 272
Posts 99
Joined 2006-06-02 09:12
20-year member
UID 56414
Status Offline
This is a problem with Unicode. But although it looks uncomfortable, actually it can be used the same way, no impact.
Floor 6 Posted 2006-10-15 05:55 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
Originally posted by my3439955 at 2006-10-14 23:23:
This is a Unicode issue.
But although it looks uncomfortable,
actually it can still be used,
no impact.


  But there are still some small troubles during the use.```

  Don't believe it, you can try more.``

  
              PS: Brother's avatar is also okay, quite cool~
Floor 7 Posted 2007-03-28 02:17 ·  IANA 局域网IP(Private-Use)
初级用户
★★
Credits 186
Posts 92
Joined 2007-03-27 08:20
19-year member
UID 83047
Gender Male
Status Offline
Floor 8 Posted 2007-06-14 17:54 ·  中国 安徽 合肥 电信
新手上路
Credits 6
Posts 4
Joined 2007-05-30 20:43
19-year member
UID 89798
Gender Male
Status Offline
Points: 122
Posts: 60
Registered: 2007-3-27
Status: Offline 『Post 7』:

So profound and mysterious
Floor 9 Posted 2007-06-16 15:23 ·  IANA 局域网IP(Private-Use)
新手上路
Credits 16
Posts 8
Joined 2007-06-04 21:57
19-year member
UID 90264
Gender Male
Status Offline
My system is Windows 2000, and it has become Administrator.ZLX>「开始
That is, the three characters "「开始" cannot be deleted at all
Floor 10 Posted 2007-06-16 16:56 ·  中国 湖北 武汉 电信
中级用户
★★
Credits 301
Posts 135
Joined 2007-05-15 16:49
19-year member
UID 88615
Gender Male
Status Offline
Bamboo master lxmxn found a bug at once, which is really useful, but I don't know the reason. Anyway, running NOTEPAD at "C:\Documents and Settings\Administrato" starts Notepad.
Floor 11 Posted 2007-06-16 21:56 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
You can check the link in floor 4 for the reason.
Floor 12 Posted 2007-08-22 23:31 ·  中国 湖南 长沙 电信
新手上路
Credits 7
Posts 3
Joined 2005-12-02 13:02
20-year member
UID 46335
Status Offline
There is no such phenomenon with mine.
Floor 13 Posted 2007-08-23 10:14 ·  中国 上海 电信张江机房
初级用户
★★
Credits 150
Posts 68
Joined 2007-04-26 00:18
19-year member
UID 86476
Gender Male
Status Offline
Oh, it turns out that cmd can also auto-complete. Oh, this place is really a cow pen~
Floor 14 Posted 2008-02-19 00:46 ·  中国 广东 梅州 电信
新手上路
Credits 13
Posts 8
Joined 2008-02-18 23:26
18-year member
UID 110928
Gender Male
Status Offline
Floor 15 Posted 2008-09-05 11:37 ·  中国 江西 新余 电信
新手上路
Credits 4
Posts 2
Joined 2008-09-05 09:57
17-year member
UID 124836
Gender Male
From 河北邯郸
Status Offline
Don't understand, but it's quite interesting oh
Forum Jump: