Setting terminal to show latest output in another color - macos

Is there a way to set the mac terminal to output its lastest output in a different color?
I am tired of wasting time looking for the last command when the terminal gets filled.

No, but you could arrange for your prompt to be in a different color. You could also split the pane; the bottom will scroll with the output while the top stays wherever it was.

Related

Annoying terminal bug, is this known and a solution is out there?

I use the default terminal.app
I use cmd+d command to split panes so I can look at the part of the code while using another command.
This annoying bug comes up when de-splitting the panes.
What it does is that it basically reduces the vertical length of the terminal, so that after de-split, terminal is not filling my screen vertically.
Is there any solution to this?
Any true solution is going to have to depend on a bug fix. But this works for me:
Set the window default size in Preferences/Profiles/Window.
Assign a shortcut key to Window/Return to Default Size.
You could also use the inspector that you get with Shell -> Show Inspector.

How to keep same line on terminal top with long output?

Under Ubuntu 14.04, I'm writing a script that output a lot of text (several commands...), and I would like to keep one or more lines always on top of the terminal screen to display what's running title.
In other words, I try to reduce terminal vertical scroll zone and write in that non-scrolling zone.
How can I do that? I saw similar stuff using a loop catching output line by line, but I'm unable to find a way to tell the system to print from let's say line 2 or 3.
Thanks for your answers,
Nicolas
Nic, it appears this does quite nicely.
http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x361.html

Scroll up in mongo console on Windows

I need to see output of db.currentOp() in my mongo console (mongo.exe) on Windows. But it gives so much results that they don't fit the screen. If I scroll up with the scrollbar on the left, I still can't get entire output. Is there a way to see the entire output?
Thanx
It sounds like you need to increase the Screen Buffer Size in your Windows Command Prompt settings.

Can I make emacs grep windows just use the other window to open files in?

I've got emacs in front of me.
I've run a find-grep, and it's got many hits, which are displayed in a window. The file names are displayed in green as hyperlinks.
I make that the only window, with C-x 1.
If I click on a file name, the window splits vertically, and the file with the found text is displayed in the other window.
If I click on further filenames, then the new file replaces the old file, which is what I want to happen.
So far, so good...
However if I resize the windows, then emacs will periodically (when I click) split one of the two windows again, rendering the display difficult to read. It will then cycle opening new files between the two new windows. Occasionally it will open more windows and make the situation worse. If I close any of these new windows they just get reopened again.
In fact sometimes this perverse behaviour happens even if I don't resize anything. It just seems to happen more often if I do.
I would like emacs to stop buggering around and just have one find-grep window and one 'display' window, and always replace the display window with the new file. I would also like to be able to set these windows to the sizes that seem most convenient.
Is there any way to achieve this?
Or can anyone point me to an essay on how the whole (replace the contents of this window/replace the contents of a different window/create another window by splitting) thing works, so I can go and hack it sane.
Short fix:
Try doing this
(setq split-height-threshold nil
split-width-threshold nil)
This will prevent Emacs from splitting windows automatically (horizontally or vertically). This might be undesirable in other situations, but this should do the job. Try it for a week or so and see if it disrupts your flow.
Also, I found that if the point was in one of the windows, and I clicked on a link, the file opened up in the next window (if any).
So, if you want to make the file open in the right window (when you have more than one window), you can ensure that the point is in the window before the window you want.
Longer answer:
OK. I was able to reproduce the problem. The thing is the window showing the files is pretty big (wide or tall) because you resized it and Emacs sees that the width or height is greater than the respective threshold and splits it likewise. So, we have to either make the threshold higher or disallow the behaviour completely.
And, just to answer the last few questions:
To get current window - (selected-window)
To get next window - (next-window)
To select a window - (select-window foo-window)
To get the buffer of the current window - (current-buffer)
To get the buffer of some window - (window-buffer foo-window)
To set a buffer for a window - (set-window-buffer foo-window bar-buffer)
I'm sure you can hack together decent window/buffer management functions using these functions.
You can use C-h f to get more details on each of these functions.
Also check out the Elisp manual - http://www.chemie.fu-berlin.de/chemnet/use/info/elisp/elisp_26.html

Cygwin scrolling problem

When i run a command in cygwin when scrolled up it starts writing the output to that screen, so everything gets written over.
How can I change settings so that output will always be appended to the end not to where I have currently scrolled my window.
I found that rxvt doesn't do that but it also doesn't show me äöõü characters:(
Are you sure it's overwriting where you've currently scrolled to? I find the console just jumps back to the cursor position when there's new output. Still annoying though, and I don't know of a way to switch off that behaviour.
Anyway, have a look at 'mintty'. Like rxvt, it doesn't need an X server, but it does support Unicode, so the umlauts should be fine.

Resources