"Set" command behavior - a bug?

Feb 27, 2018
11
0
#1
The documentation says:

If you enter only name, and there is no variable with that name, SET will display all environment variables whose names begin with name. For example, if there is no variable pa, the command below will display all variables whose names start with pa:

set pa

The above command is equivalent to the command

set pa*

Here is the batch file to test this:

set var1=var1
set var11=var11
set var1


The TCC output:
1524221939034.png

The cmd.exe output:
1524222136140.png

Does it look like a bug?
 
Aug 23, 2010
249
2
#3
If you want to see the contents of a variable, use echo.
"Set" is to SET the variable.
All other behavior is undefined and cannot be relied upon across various shells.