[SERVER-6990] Clearing the screen in Terminal.app causes prompt to disappear Created: 10/Sep/12 Updated: 10/Dec/14 Resolved: 20/May/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 2.2.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Richard Kreuter (Inactive) | Assignee: | Tad Marshall |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Operating System: | OS X |
| Participants: |
| Description |
|
Clearing the screen with ^L inside Terminal.app on the Mac doesn't re-render the prompt. To reproduce: press Control-L. Anecdotally, setting a custom prompt to ">>> " and pressing ^L has the same effect. |
| Comments |
| Comment by Tad Marshall [ 20/May/13 ] | |||||||||||||||||||||
|
I filed a bug with Apple: | |||||||||||||||||||||
| Comment by Tad Marshall [ 20/May/13 ] | |||||||||||||||||||||
|
This is a bug in Terminal.app and there is no reasonable way to work around it. The escape sequence ESC [ J is "Erase in Display" and it is supposed to clear the screen from the current cursor position to the end of the screen (when issued without a numeric parameter, or with 0). This works fine in Terminal.app on any line other than the first line. On the first line, it clears the entire screen. The attached bash script "test.sh" demonstrates the bug. This script works fine in every VT100 emulator I tried with the exception of the Mac's Terminal.app.
In xterm on the Mac, the final screen looks like this:
In Terminal.app on the Mac, the final screen looks like this:
Tested on Terminal.app in 10.7.5 and 10.8 – fails in both. | |||||||||||||||||||||
| Comment by Tad Marshall [ 20/May/13 ] | |||||||||||||||||||||
|
bash shell script to demonstrate bug in Terminal.app | |||||||||||||||||||||
| Comment by Tad Marshall [ 10/Sep/12 ] | |||||||||||||||||||||
|
xterm on the Mac works fine. On Ubuntu 12.04, I tried Gnome Terminal, xterm, aterm, rxvt and yakuake and all worked fine. Something is not-the-same in the default Mac OS Terminal program. More odd behavior on this terminal: |