我对自定义命令提示符有些困惑。 我学习了命令提示符,我希望提示符有三行:
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
(directory here)
>
我尝试过这个命令,但根本不起作用:
Prompt $V &^
prompt $P &^
prompt $G
答案 0 :(得分:2)
我认为这就是你想要的:
prompt $P$_$G
如果您确实需要Windows版本:
prompt $V$_$P$_$G
如果你真的想要完全就像你的问题一样,有版权和额外的换行符,你想要这个:
prompt $V$_$_(c) 2016 Microsoft Corporation. All rights reserved.$_$_$P$_$_$G
根据帮助(prompt /?
),$^
不受支持。在某些情况下,插入符通常用于行继续和转义。
以下是文档。您会看到$P
是路径,$_
是回车,$G
是大于。您可以使用这些组合来获得结果,如上面的3个屏幕截图。
Changes the cmd.exe command prompt. PROMPT [text] text Specifies a new command prompt. Prompt can be made up of normal characters and the following special codes: $A & (Ampersand) $B | (pipe) $C ( (Left parenthesis) $D Current date $E Escape code (ASCII code 27) $F ) (Right parenthesis) $G > (greater-than sign) $H Backspace (erases previous character) $L < (less-than sign) $N Current drive $P Current drive and path $Q = (equal sign) $S (space) $T Current time $V Windows version number $_ Carriage return and linefeed $$ $ (dollar sign) If Command Extensions are enabled the PROMPT command supports the following additional formatting characters: $+ zero or more plus sign (+) characters depending upon the depth of the PUSHD directory stack, one character for each level pushed. $M Displays the remote name associated with the current drive letter or the empty string if current drive is not a network drive.