我改變了 的值%PROMPT%
,現在有些事情不工作。它的預設值是多少?
答案1
預設值為$P$G
。
可能special codes
可以使用以下命令顯示prompt /?
:
>prompt /?
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.
環境prompt
變數沒有出現在您提到的對話方塊中。我透過 找到了價值echo %prompt%
。如果出現環境變數條目,您可能應該將其刪除,這應該足以恢復為預設值。無論如何,預設情況下它不應該存在於用戶變數中。
我的用戶變數僅定義TEMP
和TMP
。