I wouldn't say that.....Windows CMD is missing a LOT of basic features that the various Linux terminals/shells have by default.
For starters, CMD has a lot less useful tools installed. Compared to bash or zsh, CMD is little more than a barely functional toy, unless you take the time to trawl the web to download and install a bunch of GNU tools yourself. Which involves manually tracking down the windows binaries for them and running windows installers for each of them.
In Bash/zsh on Linux, you can simply install any missing tools there and then in the terminal, using your installed distributions package management tools.
The shortcomings of CMD and Powershell are exactly why Cygwin is the first thing I install on a fresh install of Windows (on my workstations at work). Cygwin installs a complete Unix/Linux like environment with bash and I have access to all of my regular terminal based Linux tools.
Since "upgrading" to Windows 11, I even prefer Cygwin over installing a full Linux distro via the WSL.
Cygwin doesn't involve having to boot an entire Linux distro inside Windows - it just emulates a Unix/Linux like terminal environment on top of Windows.
Anyway.....To explain the behaviour your're seeing - and the differences on Windows and Linux/Unix.
In the terminals in Linux/Unix (and in Windows), spaces are used as delimiters, in order to distinctly separate different tokens in the command line. BTW - it's also worth bearing in mind that
cd..
would be a perfectly valid name for a file, or an executable in Linux and Windows.
The shells we use in Linux do NOT see
cd..
(without a space) and
cd ..
(with a space) as the same thing.
When you enter the command
cd ..
(with a space), it looks for an executable file called
cd
and passes it the parameter
..
. Whereas if you enter
cd..
(without a space)- the shell strictly looks for an executable file called
cd..
. If it can't find that - it correctly throws an error message and does nothing else.
In Windows, it works exactly the same way. But in Windows CMD and Powershell, the
cd
command is a "builtin". It's a command that is built into the shell itself. Whereas in Linux/Unix -
cd
is a standalone, external executable, which can be used by other shells.
In windows, when you type
cd ..
(with spaces) - it runs the cd builtin and passes
..
as a parameter - exactly as you'd expect.
But when you erroneously type
cd..
(without a space) in CMD or powershell - it will first attempt to execute a file called called "cd.." (either locally, or in the systems $PATH) - if it can't find one, for some reason it won't complain, but it will instead execute the cd builtin and pass the rest of the line
..
as a parameter.
You can prove this for yourself by opening cmd in Windows and creating a file called
cd..
:
e.g.
Now try entering the command
cd..
(with no spaces).
Because the local file called
cd..
is just an empty file - you will get an error message:
So with the file there - CMD can see the file there, but it can't execute it - so it throws an error message.
Now if we remove the file called
cd..
via the command
del cd..
and then type
cd..
(without the spaces) again.
This time, because there is no file called
cd..
in the directory, it doesn't throw an error about "command not found", like we'd see in Linux/Unix. Instead, the builtin is ran and the conjoined
..
is treated as a parameter and you'll be cd'd up a level to the C:\Users directory.
So I wouldn't say this is a feature of Windows CMD/Powershell per se. I'd say it's a quirk. A bug masquerading as a feature. And it's definitely NOT a feature that you should rely on in Windows, or ever expect to see in Linux/Unix shells. In shells like bash/zsh - the shell will do exactly what you tell it to. It doesn't try to second guess the users intentions. The user must be exact/verbose. If you make a typo - then the Problem Exists Between Keyboard And Chair (PEBKAC). It's a PICNIC (Problem In Chair, Not In Computer)!! Ha ha.
But if you do make that particular typo a lot - you could create an alias in your .bashrc (or another config file, if using a different shell).
e.g.
That will create an alias which will run
cd ..
whenever you accidentally type
cd..
(without a space).