As a programmer who often finds himself in a command window, I've always wondered why many times the default text selection functionality is rectangular, and not line-by-line.

Rectangular Selection

Rectangular selection can be useful to select column data, but an inconvenience when attempting to copy a few specific lines without excess white space. I thought this might have been a legacy feature of command lines, but it's also available in NetBeans:


However, some shells do not use rectangular text selection, such as Git Bash.

enter image description here

Why is rectangular text selection default on command prompt? Are there prominent uses (other than column selection) to justify being default?

  • Your first screen-shot shows one use-case: selecting a list of filenames from a directory listing. Windows 10 has switched to "flow" selection, which is often more useful (but you can still do rectangular selection by holding ALT). NOTE: in lots of cases, using awk wouldn't be appropriate, especially if you want to capture one-time output.
    – TripeHound
    Commented Aug 24, 2017 at 12:56
  • @TripeHound Correct, which is why I edited the question to emphasize uses other than column selection. Also correct, but awk has served me well for the few times I've needed to capture or manipulate shell column data.
    – Alan
    Commented Aug 24, 2017 at 12:59

2 Answers 2


In Terminals windows were designed using text.

If you had an email program, your emails text could have been centered on the console using a "window". This window would have its borders made up of text.

If you wanted to select and copy the email contents using the normal modern selection mode of selecting by lines you would be copying not just the email itself but also the "design" characters of the window.

The terminal itself does not know what it is displaying, so having a universal square selection tool would be easier instead of leaving selection functionality up to each specific application.

The programming application "Turbo Pascal" implemented its own text selection. However, sometimes it was useful to copy the "debug" window with variables and their values. I found column text selection to be priceless when this happened.

  • I hadn't considered the UI elements of terminals being text themselves. Great answer Joao!
    – Alan
    Commented Aug 24, 2017 at 11:58

From what I found out, the rectangular selection is referred to as Column Selection

As text editors, IDE's and command-lines have to deal with CSV and tabular data, they offer such a selection tool to make it possible to copy a column at once.

This is what I referred to. Take a look for more details.

Should also help you with the default selection issue (refer to the second answer in the link)

PS: In future, kindly do some research before posting a question. I found this with the first search result

  • Thanks for your response. If you see the end of my question, I am aware of column-selection functionality. I was curious if there are other uses for it.
    – Alan
    Commented Aug 22, 2017 at 13:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.