I'm encountering a strange issue in the Terminal app in Mac OS X Lion. When I enter in a long line of text that should wrap to the next line when it reaches the edge of the Terminal window, it continues to type on top of the text from the line above it.
Here are some screenshots to help illustrate the issue:
Before my text reaches the window edge:
After the text reaches the window edge:
I've also supplied screenshots of my text and window settings in case those might be helpful.
Text settings:
Window settings:
Thanks in advance for any assistance offered. I've had this issue for a while and just never got around to it. It's now really becoming a pain in the ass when I get into things that require big grep commands and long path names.
Restart your machine. When you log back in, open the Afloat app. From there, go to the window options and click “Keep Afloat” within the list. This process should give you the Keep Afloat option for some of your applications.
You can scroll the screen while holding fn or Shift ⇧ key. You can disable this completely by unticking: Terminal Preferences → Profiles → Keyboard → Scroll Alternate Screen.
PS1
environment variable determines what shell's prompt will look like. man bash
gives full documentation on it. (There are actually several of them, for different modes).
There are number of files that may be setting it, usually one of ~/.profile
, ~/.bashrc
, /etc/profile
or /etc/bashrc
.
If you're going to have color codes or other control sequences inside it, you must wrap them with \[
and \]
properly (and NOT wrap normal text), otherwise line editing may become messed up like in your case. I suggest resetting PS1
to the default value then carefully adding coloring back item by item.
For example:
PS1='\[\033[1m\033[32m\]\u@\h \w\[\033[0m\]\$ ' ^^^^^^^^^^^^^^^ ^^^^^^^
Coloring commands are underlined. Note how they are surrounded with \[ \]
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With