Richard Morse | 20 Jul 18:14
Favicon

Line wrap problems in Mac OS X terminal?

Hi! If I have a long command line, such that it would wrap to the next line, and the prompt is at the bottom of the
screen, when it should wrap and move the display up so that I can see the entire command, it instead clears
the line and moves the cursor to the beginning. This means that I cannot see the entire command...

Example (in monospaced font):

Existing window:

--------------------
|$ ls              |
|/Applications     |
|/Desktop          |
|/Documents        |
|$                 |
|[0:bash]    0:foo |
--------------------

The last line is the status bar for tmux.

If I try to type in a long command, what I would like to see is:

--------------------
|/Applications     |
|/Desktop          |
|/Documents        |
|$ ls /usr/local/bi|
|n/long/path       |
|[0:bash]    0:foo |
--------------------

(Continue reading)

Nicholas Marriott | 20 Jul 18:26
Picon

Re: Line wrap problems in Mac OS X terminal?

What is TERM set to inside and outside tmux?

On Tue, Jul 20, 2010 at 12:14:42PM -0400, Richard Morse wrote:
> Hi! If I have a long command line, such that it would wrap to the next line, and the prompt is at the bottom of
the screen, when it should wrap and move the display up so that I can see the entire command, it instead
clears the line and moves the cursor to the beginning. This means that I cannot see the entire command...
> 
> Example (in monospaced font):
> 
> Existing window:
> 
> --------------------
> |$ ls              |
> |/Applications     |
> |/Desktop          |
> |/Documents        |
> |$                 |
> |[0:bash]    0:foo |
> --------------------
> 
> The last line is the status bar for tmux.
> 
> If I try to type in a long command, what I would like to see is:
> 
> --------------------
> |/Applications     |
> |/Desktop          |
> |/Documents        |
> |$ ls /usr/local/bi|
> |n/long/path       |
(Continue reading)

Richard Morse | 20 Jul 18:29
Favicon

Re: Line wrap problems in Mac OS X terminal?

Outside of tmux:

$ echo $TERM
xterm-color

Inside of tmux:

$ echo $TERM
screen

On Jul 20, 2010, at 12:26 PM, Nicholas Marriott wrote:

> What is TERM set to inside and outside tmux?
> 
> 
> On Tue, Jul 20, 2010 at 12:14:42PM -0400, Richard Morse wrote:
>> Hi! If I have a long command line, such that it would wrap to the next line, and the prompt is at the bottom of
the screen, when it should wrap and move the display up so that I can see the entire command, it instead
clears the line and moves the cursor to the beginning. This means that I cannot see the entire command...
>> 
>> Example (in monospaced font):
>> 
>> Existing window:
>> 
>> --------------------
>> |$ ls              |
>> |/Applications     |
>> |/Desktop          |
>> |/Documents        |
>> |$                 |
(Continue reading)

Nicholas Marriott | 20 Jul 18:31
Picon

Re: Line wrap problems in Mac OS X terminal?

Can you reproduce in xterm?

I take it your PS1 is just '\$ '?

On Tue, Jul 20, 2010 at 12:29:45PM -0400, Richard Morse wrote:
> Outside of tmux:
> 
> $ echo $TERM
> xterm-color
> 
> Inside of tmux:
> 
> $ echo $TERM
> screen
> 
> 
> 
> On Jul 20, 2010, at 12:26 PM, Nicholas Marriott wrote:
> 
> > What is TERM set to inside and outside tmux?
> > 
> > 
> > On Tue, Jul 20, 2010 at 12:14:42PM -0400, Richard Morse wrote:
> >> Hi! If I have a long command line, such that it would wrap to the next line, and the prompt is at the bottom of
the screen, when it should wrap and move the display up so that I can see the entire command, it instead
clears the line and moves the cursor to the beginning. This means that I cannot see the entire command...
> >> 
> >> Example (in monospaced font):
> >> 
> >> Existing window:
(Continue reading)

Richard Morse | 20 Jul 19:15
Favicon

Re: Line wrap problems in Mac OS X terminal?

Since I'm running on a Mac, I don't have xterm available, and none of my other computers have X installed.
However, I downloaded iTerm.app, and it does not display the same issue. It specifies $TERM as "xterm". I
then went into Terminal.app and changed it to specify $TERM as 'xterm', and the problem disappeared!

I'm not sure what the difference between xterm and xterm-color is, and how that interacts with
Terminal.app -- where would I look to find out what is going on?

Thanks,
Ricky

p.s. I simplified the shell prompt -- PS1 is '\h:\W \u\$'.

On Jul 20, 2010, at 12:31 PM, Nicholas Marriott wrote:

> Can you reproduce in xterm?
> 
> I take it your PS1 is just '\$ '?
> 
> 
> On Tue, Jul 20, 2010 at 12:29:45PM -0400, Richard Morse wrote:
>> Outside of tmux:
>> 
>> $ echo $TERM
>> xterm-color
>> 
>> Inside of tmux:
>> 
>> $ echo $TERM
>> screen
>> 
(Continue reading)

Richard Morse | 20 Jul 19:26
Favicon

Re: Line wrap problems in Mac OS X terminal?

Bleh, of course I have xterm available, now that I think about it; I just use X11 so rarely on the Mac that I
never remember it...

Ricky

On Jul 20, 2010, at 1:15 PM, Richard Morse wrote:

> Since I'm running on a Mac, I don't have xterm available, and none of my other computers have X installed.
However, I downloaded iTerm.app, and it does not display the same issue. It specifies $TERM as "xterm". I
then went into Terminal.app and changed it to specify $TERM as 'xterm', and the problem disappeared!
> 
> I'm not sure what the difference between xterm and xterm-color is, and how that interacts with
Terminal.app -- where would I look to find out what is going on?
> 
> Thanks,
> Ricky
> 
> p.s. I simplified the shell prompt -- PS1 is '\h:\W \u\$'.
> 
> 
> On Jul 20, 2010, at 12:31 PM, Nicholas Marriott wrote:
> 
>> Can you reproduce in xterm?
>> 
>> I take it your PS1 is just '\$ '?
>> 
>> 
>> On Tue, Jul 20, 2010 at 12:29:45PM -0400, Richard Morse wrote:
>>> Outside of tmux:
>>> 
(Continue reading)

Nicholas Marriott | 20 Jul 19:38
Picon

Re: Line wrap problems in Mac OS X terminal?

Hmm. Then this is something xterm-color has or omits that xterm does
not.

It could be several things:

- Terminal.app bug.

- Part of xterm-color is Just Wrong for Terminal.app.

- Something tmux is emulating that it needs because xterm-color doesn't
  have it (probably unlikely, xterm-color has most things) and tmux has
  a bug.

You can run tmux with -vvvv and compare the part of the output file for
triggering the problem between xterm and xterm-color.

The right TERM for Terminal.app is supposed to be nsterm although it
sets xterm-color itself.

On Tue, Jul 20, 2010 at 01:15:43PM -0400, Richard Morse wrote:
> Since I'm running on a Mac, I don't have xterm available, and none of my other computers have X installed.
However, I downloaded iTerm.app, and it does not display the same issue. It specifies $TERM as "xterm". I
then went into Terminal.app and changed it to specify $TERM as 'xterm', and the problem disappeared!
> 
> I'm not sure what the difference between xterm and xterm-color is, and how that interacts with
Terminal.app -- where would I look to find out what is going on?
> 
> Thanks,
> Ricky
> 
(Continue reading)


Gmane