Why is the Windows cmd.exe limited to 80 characters wide?

前端 未结 14 1464
死守一世寂寞
死守一世寂寞 2021-01-30 04:03

I love stretching my terminal on unix. What is the history or reason behind windows lame command line?

相关标签:
14条回答
  • 2021-01-30 04:05

    While the width is not limited as other answers show, I've always found it strange that one can drag and resize the height with the mouse, but not the width.

    I think the default 80 character width is related to compatibility with old programs that assume the terminal won't be more than 80 characters wide. I don't think this has been a realistic reason for a decade or so, though.

    0 讨论(0)
  • 2021-01-30 04:05

    As others have pointed out, it's not limited to 80 characters wide, but my guess as to why it defaults to 80 characters would be that it's left over from the DOS days where CRT displays were 80 characters wide.

    See also

    0 讨论(0)
  • 2021-01-30 04:07

    Because MS value "backwards compatibility" over a lot of things and in this case I suspect it's a misplaced belief that it will somehow unnerve people if they don't have their standard 80 wide window.

    Of course it could be that it was programmed for a fixed 80 chars width when that was pretty much universal, and the additional property settings were a bit of a hack.

    0 讨论(0)
  • 2021-01-30 04:08

    It isn't. You can right click the title bar, select properties, and in the "Layout" tab alter the screen buffer size (line width and scrollback) and the window size (viewport size). If you started cmd from a shortcut, you can save these settings for future sessions.

    0 讨论(0)
  • 2021-01-30 04:09

    If you are mouse-phobic you can also just type this inside the cmd window:

    mode <cols>,<lines>
    mode 80,25
    mode 120,50
    etc.
    
    0 讨论(0)
  • 2021-01-30 04:10

    Because improving the usability and functionality of anything that Unix/GNU-like development requires will undermine Windows as a commercial platform for Microsoft's partners. Preventing this means other large companies' products for developers, such as improved terminals, and other general third party products, like word processors, video players etc. aren't competing with existing Unix/GNU software. Without this, Windows wouldn't be a profitable platform, and Microsoft would lose its desktop monopoly.

    This is why the terminal sucks, there's no POSIX API, no C99 support in MSVC and the list goes on. To clarify, common Unix/GNU technologies and development are intentionally unsupported so that large commercial software houses don't have to compete with them.

    0 讨论(0)
提交回复
热议问题