-26

When you see a terminal command line entry on Stack Exchange sites like this

$ sudo apt-get install nginx

and double click to copy and paste into your own terminal, it brings with it the leading $ symbol (or # for that matter) whereas the desired behavior which is evident on other non-Stack Exchange sites correctly ignores that leading $ or # ... should we implement this behavior here on Stack Exchange?

... not on code block just on single line entries ...the behavior change would occur on creation so the OP knows a leading $ or # is to be ignored.

2
  • 7
    Meh, would add loads of complexity - you'd have to be able to detect shell commands, tell them apart from other code blocks, and exclude the leading character only in those cases. Copy&pasters just need to be more careful.
    – Pekka
    Mar 14, 2017 at 14:26
  • 6
    One of my favorites: stackoverflow.com/q/19141512/17034 :) Mar 14, 2017 at 14:46

1 Answer 1

17

No thanks.

The effort required to style this properly, while preventing existing content from breaking all over the place hardly seems worth it, compared to pressing Home, Delete after pasting.

Or just click-and-drag select. It's quite intuitive.

Not the answer you're looking for? Browse other questions tagged .