『第 17 楼』:
使用 LLM 解释/回答一下
Prompt
更改 Cmd.exe 提示符。如果不带参数使用,prompt 将命令提示符重置为默认设置,当前驱动器盘符后接当前目录和大于符号 (>)。
语法
prompt
参数
text
指定要包含在系统提示符中的任何文本和信息。
/?
在命令提示符显示帮助。
注释
可以自定义命令提示符,以显示所需的任何文本,包括当前目录名、时间和日期以及 Windows XP 版本号等信息。
下表列出了能够在 text 命令行选项中包含的字符组合,而不是(或除了)一个或多个字符串。列表包括对添加到命令提示符的每个字符组合的文本或信息的简要描述。 字符 说明
$q =(等号)
$$ $(美元符号)
$t 当前时间
$d 当前日期
$p 当前驱动器和路径
$v Windows XP 版本号
$n 当前驱动器
$g >(大于号)
$l <(小于号)
$b |(pipe)
$_ 回车符 - 换行符
$e ANSI 转义代码(代码 27)
$h 退格键(删除已写入提示命令行的字符)
$a & (与符号)
$c ((左括号)
$F )(右括号)
$s space
启用了命令扩展(即默认值)时,prompt 命令可支持下表中列出的格式化字符。 字符 说明
$+ 零个或多个加号 (+) 字符,取决于 pushd 目录堆栈的深度,每推入一级一个字符。
$m 与当前驱动器盘符关联的远程名称,如果当前驱动器不是网络驱动器,则为空字符串。
如果在文本参数中包括 $p字符,系统将在输入每个命令后读取磁盘,以确定当前驱动器和路径。这样会花费额外的时间,特别是对于软盘驱动器。
范例
以下范例设置命令提示符以显示当前驱动器和路径,后接大于号 (>):
prompt $p$g
以下命令显示两行提示,第一行显示当前时间,第二行显示当前日期:
prompt time is:$t$_date is$d
Last edited by ccwan on 2006-11-25 at 11:52 PM ]
Change the Cmd.exe prompt. If used without parameters, prompt resets the command prompt to the default setting, which is the current drive letter followed by the current directory and a greater-than sign (>).
Syntax
prompt
Parameters
text
Specifies any text and information to include in the system prompt.
/?
Displays help at the command prompt.
Remarks
You can customize the command prompt to display any desired text, including the current directory name, time and date, and the Windows XP version number, etc.
The following table lists the character combinations that can be included in the text command-line option instead of (or in addition to) one or more strings. The list includes a brief description of the text or information added to the command prompt for each character combination. Character Description
$q = (equal sign)
$$ $ (dollar sign)
$t Current time
$d Current date
$p Current drive and path
$v Windows XP version number
$n Current drive
$g > (greater-than sign)
$l < (less-than sign)
$b | (pipe)
$_ Carriage return - line feed
$e ANSI escape code (code 27)
$h Backspace key (deletes a character written to the prompt command line)
$a & (ampersand)
$c ( (left parenthesis)
$F ) (right parenthesis)
$s space
When command extensions are enabled (which is the default), the prompt command supports the formatting characters listed in the following table. Character Description
$+ Zero or more plus (+) characters, depending on the depth of the pushd directory stack, one character for each level pushed.
$m The remote name associated with the current drive letter, or an empty string if the current drive is not a network drive.
If the $p character is included in the text parameter, the system reads the disk after each command is entered to determine the current drive and path. This takes extra time, especially for floppy drives.
Examples
The following example sets the command prompt to display the current drive and path, followed by a greater-than sign (>):
prompt $p$g
The following command displays a two-line prompt, with the first line showing the current time and the second line showing the current date:
prompt time is:$t$_date is$d
Last edited by ccwan on 2006-11-25 at 11:52 PM ]
|