Obviously my ignorance but why is this a "First world problem question"? (Unless the idea is that it is not a problem which would occur outside the "first world" due to a lack of technology. But that seems both implausible as an interpretation and inaccurate as a claim...)
It was supposed to be a funny and attention grabbing title.
My thought was that so many people on this forum have serious computer problems, such as webcams not working, regressions when updating, and installation troubles, that my problem is much much less serious: When I press the enter key a lot inbetween commands my pinky gets tiiired. It reminded me of other "first world problems", such as "I forgot to bring my phone with me when I went to poop and I was bored the entire time" and "None of my 3 wiper speeds are proportional to the amount of rain I'm in".
]]>make 2>&1 | tee make.out
However, I don't really compile stuff much now - moving the gnu/linux has made it easy to be lazy - but I assume it would work here as well.
EDIT: Obviously my ignorance but why is this a "First world problem question"? (Unless the idea is that it is not a problem which would occur outside the "first world" due to a lack of technology. But that seems both implausible as an interpretation and inaccurate as a claim...)
]]>I have my PS1 print a blank line, the time in colour on it's own line and then the pwd + prompt.
Makes it easier to find the start of each command I ran.PS1='\n\[\033[0;33m\]\D{%l:%M:%S %P}\n\[\033[01;34m\] [ \[\033[01;37m\]\W\[\033[01;34m\] ]\[\033[1;33m\]$\[\033[00m\] '
I just wanted to say that making this my PS1 was one of the best things I've ever done on my computer. I was going to modify to make it more "mine", but it was completely unnecessary. It's just perfect the way it is.
]]>In regards to clearing a terminal buffer, the following works in urxvt:
echo -ne '\033c'
That's great! Thanks to you, I added it to my bashrc file. I called mine "wipe". Next I'll have to look into getting it to work with tmux.
]]>Color GCC: This will add some color to GCC compiler error messages so that they are easier to visually parse.
Syntastic: If you're a Vim user, you can use this to run a syntax check on a source file while you have it opened. Any found syntax errors are then highlighted in the buffer, and the corresponding compiler error message is printed below the buffer. This will work with either console vim, or gvim. This plugin was a HUGE time saver for me. (I expect that emacs has a similar plugin.)
In regards to clearing a terminal buffer, the following works in urxvt:
echo -ne '\033c'
In my bashrc file, I just created an alias,
alias cls="echo -ne '\033c'"
and run it whenever I want to clear the terminal buffer.
I'm not sure if this is what you were looking for, but I hope it helps.
]]>EDIT: OOPS! no it doesn't. It all only showed because it gets dumped over the same terminal. If I try to scroll around it vanishes. But a slightly less simple `make 2>&1 | less` should do.
]]>make | less
Does this work? Will "less" capture all of the lines, including the error messages?
]]>I have my PS1 print a blank line, the time in colour on it's own line and then the pwd + prompt.
Makes it easier to find the start of each command I ran.
Woah. Even though I'll lose some vertical space with each command, I think I'm gonna have to try that.
I also think the idea of splitting up the error information into a separate terminal window.
Aw, heck, these are all cool ideas.
]]>*I actually just pulled this out of my *(&^, but with a make-output syntax file and a source-highlight lesspipe, this could be pretty useful. Time to go write a syntax file.
]]>PS1='\n\[\033[0;33m\]\D{%l:%M:%S %P}\n\[\033[01;34m\] [ \[\033[01;37m\]\W\[\033[01;34m\] ]\[\033[1;33m\]$\[\033[00m\] '
6:17:58 am
[ ~ ]$ echo hello
hello
7:10:03 am
[ ~ ]$ echo world
world
7:10:08 am
[ ~ ]$
next() { printf "%s\n" "-------------------------------------------------------" && clear ; }
I use for example "reset" that initialize my terminal again, so all output is really cleared.
Or you open two terminals,
First - you compile your code with
gcc helloworld.c >debugg 2>&1
Second- you watch your output
watch cat debugg
Or get creative
]]>This situation comes up usually when I'm programming. I'll compile and see a bunch of errors. I'll make some changes and compile again. When I see more error messages appear, I want to scroll up to the first error that occured, but it's haaard because the error messages blend together with the messages from the last time I tried to compile. So then I'll enter a bunch of new lines like a doinkus and run make again.
Sometimes I try clearing the screen with Ctrl-L, but that always make me hesitant. Will it enter new lines, will it simply shift the text up to the top of the window, or will it erase a screen's worth of output? Does it change depending on whether I'm in TTY, urxvt, or tmux? I don't know. Whatever.
I have some immediate ideas about how to separate output, such as printing a horizontal line of dashes when a command exits, or maybe using color.
I have the feeling some enterprising Arch Linux user has figured out a better way. Do you have a special way of separating terminal output?
]]>