.Dd $Mdocdate$ .Dt CMD 8 .Os MICROSOFT WINDOWS .Sh NAME .Nm cmd .Nd Windows Command Prompt .Sh SYNOPSIS .Nm .Op Fl DQ .Op Fl A|U .Op Oo Fl S Oc Fl C|K Ar command .Op Fl E Ns = Ns Ar ON|OFF .Op Fl T Ns = Ns Ar fb .Op Fl V Ns = Ns Ar ON|OFF .Sh DESCRIPTION .Nm is a Linux wrapper for Windows Command Prompt. Its options are as follows: .Bl -tag -width Ds .It Fl ? Displays a fairly unhelpful and incomplete help text. .It Fl A Standard outputs will be redirected in ANSI. .It Fl C Ar command Executes the specified command and exits. .It Fl D Disables autorun commands. See .Sx AUTORUN below. .It Fl E Ns = Ns Ar ON|OFF Enable or disable command extensions. See .Sx COMMAND EXTENSIONS below. .It Fl F Ns = Ns Ar ON|OFF Enable or disable filename completion. See .Sx FILENAME COMPLETION below. .It Fl K Ar command Executes the specified command, then become interactive. .It Fl Q Disables echoing commands for non-interactive modes. .It Fl S Modifies input handling. See .Sx MODIFIED INPUT HANDLING below. .It Fl T Ns = Ns Ar fb Output will use colors as if 'color xx' was called; the first digit sets the foreground color, and the second digit sets the background color. .It Fl U Standard outputs will be redirected in Unicode. .It Fl V Ns = Ns Ar ON|OFF Enable or disable execution-time environment variable expansion. See .Sx EXECUTION-TIME ENVIRONMENT VARIABLE EXPANSION below. .Sh BEHAVIORS .Ss AUTORUN Autorun is enabled by default, and can be disabled with the .Fl D flag. If enabled, the program will search registry variables .Cd HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun and .Cd HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun for commands at startup and execute them if present. .Ss COMMAND EXTENSIONS Command extensions are enabled by default, and can be disabled by setting .Fl E Ns = Ns OFF . Extensions can modify the following commands: .Pp .Ic DEL or Ic ERASE , .Ic COLOR , .Ic CD or Ic CHDIR , .Ic MD or Ic MKDIR , .Ic PROMPT , .Ic PUSHD , .Ic POPD , .Ic SET , .Ic SETLOCAL , .Ic ENDLOCAL , .Ic IF , .Ic FOR , .Ic CALL , .Ic SHIFT , .Ic GOTO , .Ic START , .Ic ASSOC , .Ic FTYPE .Ss EXECUTION-TIME ENVIRONMENT VARIABLE EXPANSION Execution-time environment variable expansion is disabled by default, and can be enabled by setting .Fl V Ns = Ns OFF . If enabled, enclosing a variable name with '!' characters will substitute the variable's value at command execution time. .Ss FILENAME COMPLETION Filename completion is disabled by default, and can be enabled by setting .Fl F Ns = Ns ON . If enabled, Ctrl-D and Ctrl-F can be used for directory and file completion respectively. .Ss MODIFIED INPUT HANDLING If the .Fl S flag is present, the program will strip the leading and trailing quotes from the .Ar command supplied to .Fl C or .Fl K and pass the remaining string literally as if it was typed directly into the prompt, ignoring special characters. .Sh BUGS .Nm lacks escape characters, meaning arguments with special characters .Em must be enclosed in quotes.