bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

shouldn't prompt printing be smarter?


From: Francesco Montorsi
Subject: shouldn't prompt printing be smarter?
Date: Sun, 01 Apr 2007 15:30:17 +0200
User-agent: Mozilla Thunderbird 1.5.0.10 (X11/20070306)

Hi,
I think you all have encountered this: do a "cat somefile" where "somefile" is a text file _without_ a final newline. You'll see the prompt is printed both at the end of the text printed by 'cat' and then, also at the beginning of that same line.

I'm attaching a screenshot which should make it clear.

This results in a very weird/annoying effect.

I think it would be great if bash before printing the prompt could do a simple check: if the cursor is not positioned in the first column of the terminal, then prepend the prompt with a newline.

Thoughts?

Thanks,
Francesco

PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]