FDOS / freecom

FreeDOS Command Shell (command.com)
http://www.freedos.org/
GNU General Public License v2.0
158 stars 38 forks source link

Useless DIR output with /B option set in the DIRCMD environment variable from autoexec.bat #3

Closed cjsthompson closed 6 years ago

cjsthompson commented 6 years ago

Hello,

I have stumbled upon a weird bug when trying to set DIRCMD=/W /P /B /ONG in autoexec.bat. When I do that, if I do DIR (alias ls in the pic) I get a bunch of "String #133" as output instead of the expected list of files:

screen01

If I set DIRCMD in autoexec.bat to "/W /P /B" it works as expected. If I set it to "/W /P /ONG" it works as expected too. But if I set it to "/B /ONG" then I get the "String #133"s again.

If I set DIRCMD from the command line to "/W /P /B /ONG" with the SET command, it works as expected:

Seems like the combination of the options /B and /ONG but only when set from autoexec.bat causes this problem.

This is using "FreeCOM 0.84-pre5 - WATCOMC - XMS_Swap"

bartoldeman commented 6 years ago

I'm 99% sure this was fixed in 5c8321f5, as the strings were not copied correctly from XMS if you used "dir /b"; without /b they were working mostly by accident.

cjsthompson commented 6 years ago

Thanks. I'll upgrade.