Re electronixtar:
大略Google搜索了一下关于自动完成的信息。
在非微软网站的信息中,所见皆明言或暗示自动完成默认是关闭的,需要cmd /f或者cmd /f:on开启。
在微软网站发布的信息中,大多文章转贴了CMD的帮助信息,“文件和目录名完成不按默认值启用。”或者“ile and Directory name completion is NOT enabled by default.”
在TechNet中找到一些有用的信息:
与自动完成相关的注册表资源有两个子键和四个表项:
HKLM\Software\Microsoft\Command Processor\CompletionChar
HKLM\Software\Microsoft\Command Processor\PathCompletionChar
HKCU\Software\Microsoft\Command Processor\CompletionChar
HKCU\Software\Microsoft\Command Processor\PathCompletionChar
正常状态下,这四个表项中只要有一项的值为控制字符,则自动完成将开启。PathCompletionChar仅完成目录名,CompletionChar完成文件名和目录名。在同时设置的情况下,HKCU的设置优先于HKLM。使用 cmd /f 后,自动完成字符将固定为Ctr+D/Ctrl+F,不受HKCU/HKLM的键值控制。
关键是默认值的问题,因为CompletionChar如果是0x0,0xD,或者大于>=0x20的字符,则自动完成将关闭(实际上是因为不符合激活条件而无法被激活)。而关于默认值的表述,在TechNet的文章中出现了矛盾。的默认值为0x9,即Tab,的默认值为0x40,即disabled。
另外,TechNet的相关文章是位于Windows Server 2003技术库的,对XP和2000不具有指向性。在我的现在XP系统中,CompletionChar为0x9,但是我的系统并非原版,而是优化过的版本,我自己也曾修改过CompletionChar。也无法排除ServicePack或者HotFix是否曾经对其进行了修改。
所以,这个问题仍然需要进一步验证。
CompletionChar Entry
http://technet2.microsoft.com/WindowsServer/en/Library/1ff97534-38d4-4cc1-86f1-c2fc2689367a1033.mspx?mfr=true
Command Processor\CompletionChar
http://technet2.microsoft.com/WindowsServer/en/Library/1ff97534-38d4-4cc1-86f1-c2fc2689367a1033.mspx?mfr=true
Re electronixtar:
Briefly searched on Google about information regarding autocompletion.
In non-Microsoft website information, it is clearly stated or implied that autocompletion is disabled by default, and needs cmd /f or cmd /f:on to enable.
In Microsoft website published information, most articles reposted the help information of CMD, "File and directory name completion is NOT enabled by default." or "ile and Directory name completion is NOT enabled by default."
Found some useful information in TechNet:
There are two subkeys and four entries related to autocompletion in the registry:
HKLM\Software\Microsoft\Command Processor\CompletionChar
HKLM\Software\Microsoft\Command Processor\PathCompletionChar
HKCU\Software\Microsoft\Command Processor\CompletionChar
HKCU\Software\Microsoft\Command Processor\PathCompletionChar
Under normal conditions, as long as one of these four entries has a value of a control character, autocompletion will be enabled. PathCompletionChar only completes directory names, and CompletionChar completes file names and directory names. When both are set, the settings in HKCU take precedence over HKLM. After using cmd /f, the autocompletion character will be fixed as Ctrl+D/Ctrl+F, regardless of the key values in HKCU/HKLM.
The key is the issue of default values, because if CompletionChar is 0x0, 0xD, or greater than >=0x20, autocompletion will be disabled (actually because it does not meet the activation conditions and cannot be activated). And there is a contradiction in the description of default values in TechNet articles . has a default value of 0x9, which is Tab, has a default value of 0x40, which is disabled.
In addition, the relevant TechNet articles are in the Windows Server 2003 technical library, and are not directional for XP and 2000. In my current XP system, CompletionChar is 0x9, but my system is not an original version, but an optimized version, and I have also modified CompletionChar myself. It is also impossible to rule out whether ServicePack or HotFix has ever modified it.
So, this issue still needs further verification.
CompletionChar Entry
http://technet2.microsoft.com/WindowsServer/en/Library/1ff97534-38d4-4cc1-86f1-c2fc2689367a1033.mspx?mfr=true
Command Processor\CompletionChar
http://technet2.microsoft.com/WindowsServer/en/Library/1ff97534-38d4-4cc1-86f1-c2fc2689367a1033.mspx?mfr=true