Terminals have a fixed character width and height, and most (all?) terminal application programs make the window an even multiple of that size (then add the window title, some margin around the sides, etc.), so there will never be a partial row or column visible.
They could theoretically add more margin at the right/bottom of the window when the window is zoomed out, but then your question might merely be replaced with someone else asking “Why is there always some blank space at the window edge when the window is zoomed?”.
And what should happen to the window if you resize or show/hide the Dock (for example) such that the window is no longer the same dimensions as it would be if you zoomed it again to fit the new display area? When you Zoom a window, it isn’t placed into a “zoomed” state, it’s just resized to the current available display area at the time you Zoom it. If the available display area changes and you haven’t asked it to Zoom again, then what?
Not that these aren’t solvable, but there are a number of dynamic behaviors to consider, and terminal applications typically keep things simple.
Note that Mac OS X Lion “Full Screen” is an actual state that the window is in and Terminal always fits the window to the size of the display, updating when the display size changes, and adds margins as mentioned above. The size of the Dock, for example, is ignored.
You'll want to override iTerm's default shortcuts with your own shortcuts to "Ignore".
Go to Preferences > Key
and press the + button at the bottom of the Global Shortcut Keys:
Then add an entry for Cmd+K and choose "Ignore" for the action:
This disables Cmd+K.
Best Answer
It's your
$PS1
- it's not properly escaped. You have to escape all non-printing characters with\[
and\]
. For example, if you haveyou have to change it to
or your cursor will appear far to the right because your shell thinks your prompt is that long, and when it retypes the command it can't find it. Annoying, I know. In
zsh
you need to use%{
and%}
IIRC.And while you're considering switching to another shell, I'd suggest fish. It's a bit more of a jump, but it keeps me sane.