Skip to content

Commit 75575c9

Browse files
Kissakifdncred
andauthored
Update forwarded cmd.exe commands docs (#1613)
* Update forwarded cmd.exe commands docs Replaces #1605 (which documented behavior across versions). The "if no executable by that name exists" has been wrong since 0.94.0 (not disclosed in release notes, but consequence of 6c649809d38a687cd63b59ab028b7f30207e5663). The "used to" (prior version 0.67 2022-08-16) is very old, and no longer worth it to keep. Add information about forwarded commands overshadowing external files. * Improve wording * 'forwarded' -> 'internal' Co-authored-by: Darren Schroeder <[email protected]> --------- Co-authored-by: Darren Schroeder <[email protected]>
1 parent 08bcbf8 commit 75575c9

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

book/coming_from_cmd.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,14 @@ This table was last updated for Nu 0.67.0.
5757
| `VERIFY` | | Verify that file writes happen |
5858
| `VOL` | | Show drive information |
5959

60-
Before Nu version 0.67, Nu [used to](https://www.nushell.sh/blog/2022-08-16-nushell-0_67.html#windows-cmd-exe-changes-rgwood) use CMD.EXE to launch external commands, which meant that the above builtins could be run as an `^external` command. As of version 0.67, however, Nu no longer uses CMD.EXE to launch externals, meaning the above builtins cannot be run from within Nu, except for `ASSOC`, `CLS`, `ECHO`, `FTYPE`, `MKLINK`, `PAUSE`, `START`, `VER`, and `VOL`, which are explicitly allowed to be interpreted by CMD if no executable by that name exists.
60+
## Forwarded CMD.EXE commands
61+
62+
Nu accepts and runs *some* of CMD.EXE's internal commands through `cmd.exe`.
63+
64+
The internal commands are: `ASSOC`, `CLS`, `ECHO`, `FTYPE`, `MKLINK`, `PAUSE`, `START`, `VER`, `VOL`
65+
66+
These internal commands take precedence over external commands.
67+
68+
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.
69+
70+
Executing `./ver` or `ver.bat` *will* execute the local bat file though.

0 commit comments

Comments
 (0)