Home Explore Blog CI



nushell

5th chunk of `book/coming_from_cmd.md`
d581f241c337cbd3ee005630b9632bc51e974ca8abc4b1700000000100000c0f
| `SETLOCAL`                           | (default behavior)                                                                  | Localize environment changes to a script                              |
| `START <path>`                       | Partially covered by `start <path>`                                                 | Open the path in the system-configured default application            |
| `START <internal command>`           |                                                                                     | Start a separate window to run a specified internal command           |
| `START <batch file>`                 |                                                                                     | Start a separate window to run a specified batch file                 |
| `TIME /T`                            | `date now \| format date "%H:%M:%S"`                                                | Get the current time                                                  |
| `TIME`                               |                                                                                     | Set the current time                                                  |
| `TITLE`                              |                                                                                     | Set the cmd.exe window name                                           |
| `TYPE`                               | `open --raw`                                                                        | Display the contents of a text file                                   |
|                                      | `open`                                                                              | Open a file as structured data                                        |
| `VER`                                |                                                                                     | Display the OS version                                                |
| `VERIFY`                             |                                                                                     | Verify that file writes happen                                        |
| `VOL`                                |                                                                                     | Show drive information                                                |

## Forwarded CMD.EXE commands

Nu accepts and runs *some* of CMD.EXE's internal commands through `cmd.exe`.

The internal commands are: `ASSOC`, `CLS`, `ECHO`, `FTYPE`, `MKLINK`, `PAUSE`, `START`, `VER`, `VOL`

These internal commands take precedence over external commands.

For example, with a `ver.bat` file in the current working directory, executing `^ver` executes CMD.EXE's internal `VER` command, *NOT* the `ver.bat` file.

Executing `./ver` or `ver.bat` *will* execute the local bat file though.

Note that Nushell has its own [`start` command](/commands/docs/start.md) which takes precedence.
You can call the CMD.EXE's internal `START` command with the external command syntax `^start`.

Title: CMD.EXE to Nu Comparison Table (Continued) and Forwarded Commands
Summary
This section of the comparison table covers CMD.EXE commands for environment localization (SETLOCAL), opening paths (START), running commands/batch files in new windows (START), time management (TIME), window title setting (TITLE), file content display (TYPE), OS version display (VER), file write verification (VERIFY), and drive information (VOL). It then details the CMD.EXE internal commands that Nu directly accepts and runs, including ASSOC, CLS, ECHO, FTYPE, MKLINK, PAUSE, START, VER, and VOL, noting their precedence over external commands and Nu's own `start` command.