In the CMD interpreter on Windows, the
Up (↑) arrow key replaces the current input (not sure what the accurate term is) with commands in the command history; commands that have previously been executed.
An odd idiosyncrasy of CMD is that on a fresh instance, when there are no previous commands in the history, the accidental pressing of the Up arrow key replaces the current input with the last "command" in the history; nothing, essentially clearing the input. What's more, pressing the
Down (↓) arrow doesn't return to the previous command, as normal navigatiion through the command history would allow. Instead, you're now back at square one, with a blank line of input. Essentially then, when you're typing in the first command of a new CMD instance, the Up key doubles as a "clear input" key.
Whilst this seems like a relatively minute problem that only applies to the very specific scenario described above, and whether it's actually just an odd idiosyncrasy of CMD or an actual bug, I can't count the amount of times over the last few days I've inadvertently lost long and complicated commands in the midst of trying to learn more advanced CMD, and it'd be nice if there were some workaround/fix for it. Who knows, maybe it's actually a "feature, not a bug", and that it serves some actual design purpose that I've missed. Either way, I'd appreciate some enlightenment.