-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Frank Penczek wrote:
> Hi,
> 
> On Sat, Aug 16, 2008 at 1:45 AM, Matt Harrison
> <[EMAIL PROTECTED]> wrote:
>> I connect to my SXCE box regularly over ssh and I've got a bash line
>> wrapping problem that is driving me mad. I googled about this for 2
>> weeks and haven't found any solution.
>>
>> If I type a command that exceeds 65 characters (including the shell
>> prompt), it causes the line to wrap to the beginning of the same line,
>> and if I go back to change the command, it litters up the entire
>> terminal. Apart from making a mess it makes it really hard to work in
>> the console.
>>
>> This problem manifests when connecting over ssh from either a linux
>> machine with Konsole, or from Windows with PuTTY. I have tried various
>> things, including changing terminal types, and using the "shopt" internal.
>>
>> In linux this problem occurred now and then but merely setting my term
>> type to "linux" always sorted it out.
>>
>> Does anyone have any information relating to this, if I can find a
>> solution it would make my life so much easier.
>>
>> On a side note, i have "\w" in my PS1 prompt to display the CWD. This is
>> supposed to abbreviate the CWD with a tilde if working inside the home
>> directory. Unfortunately, if working as any user other than root, the
>> path is always displayed in full, as if outside the home directory. This
>> makes the prompt very large and adds to the 65 character limit problem.
>>
>> Any ideas?
>>
>> Thanks
>>
>> Matt
> 
> I've had a very similar problem. It turned out that it was related to
> escape sequences I've used for colours, more specifically, that bash
> didn't recognised these as non-printable characters (so I read).
> Embedding all sequences in \[ and \] solved it for me. For example, if
> your prompt command is "\e[0;37m\W\e[0;34$ " change it to
> "\[\e[0;37m\]\W\[\e[0;34\]$ " and see if it works for you as well.
> 
> Cheers,
>  Frank
> 

Excellent, I was using a lot of colour escapes in my profile and
wrapping them with \[ and \] has solved the wrapping problem. Now I just
have to find out why \w isn't being collapsed to a tilde when possible :P

Thanks

Matt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)

iEYEARECAAYFAkipp/AACgkQiMZP8RXkRgRduQCgjFtNXtS4Cf56QndNyfVMwzkf
8BoAmwR50Di++8xZPor/VaNEt2X8fC5h
=UAWq
-----END PGP SIGNATURE-----
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to