Questions about windows support
H. S. Teoh
hsteoh at quickfur.ath.cx
Tue Feb 21 17:48:30 PST 2012
On Tue, Feb 21, 2012 at 07:45:36PM -0500, Nick Sabalausky wrote:
> Windows's cmd.exe always inserts a newline right before a command
> prompt. So you get the best of both worlds. Only issue is you end up
> with excess newlines. For example, you get:
> C:\>echo Hello > filea.txt
> C:\>echo Hello > fileb.txt
> Come to think of it, bash should be able to do the same thing if you add a
> newline to the beginning of $PS1...
> Ha! It does work! Boy is that funny, it makes bash look like windows :)
> That's just weird.
LOL... yeah that *is* weird.
> But, of course, it does mean a lot of extra blank lines. Which is ugly
> if you're doing a lot of no-output commands. But then, it's also much
> easier to read when there's a lot of heavy-output commands. It's a
> tradeoff :/
I was going to suggest writing a terminal wrapper to postprocess bash's
output to compress unnecessary blank lines, but then I realized it won't
work, 'cos bash does try to outsmart the outdated terminal concept by
querying the kernel about what kind of stdout it's talking to. If it
decides that the wrapper is a "dumb terminal", then you'll get a
crippled shell with no meta keys, no history, no colors, no nothing
except pure stream output. Which is a lot worse.
And even if you manage to coax bash to work properly, this would
probably also break most text-mode programs that try to do anything more
than just write to stdout as a stream (like anything using ncurses). So
the result would be totally unusable. :-(
If creativity is stifled by rigid discipline, then it is not true creativity.
More information about the Digitalmars-d