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.
ls
output with colors (ls -G
) is not the default option. Run the following command in your terminal to enable ls colors by default:
echo "alias ls='ls -G'" >> ~/.bashrc
source ~/.bashrc
This and all future terminal sessions will now display colors correctly.
If you're still not seeing colors on your remote (or local) session follow these steps:
In iTerm verify that you're sending a terminal type that supports colors. Open the preferences window -> Profiles -> Default -> Terminal. I'd recommend putting xterm-256color
as the Terminal Type.
While connected to the remote machine, run ls -G
and open the iTerm preferences again: preferences window -> profiles -> Default -> Colors. Adjust the ANSI Colors, and turn the minimum contrast down until the colors in the terminal window start to show color.
If the remote system supports ls --color=always
, remove any existing aliases in ~/.profile or ~/.bashrc and update as follows:
echo "alias ls='ls --color=always'" >> ~/.bashrc
Best Answer
Both applications: built-in Apple Terminal and iTerm2 are only terminal emulators. They do not implement any commands, they just take care of the display.
When you open either a Terminal or an iTerm2 window, it automatically runs a shell (like bash or ksh). This is the program that interprets most of the commands that you know as CLI. When you type a command into a shell, it first tries to match it with its internal set of commands and interprets it accordingly. If a command is not found, the shell will try to find a program which name matches the command. This is what you might perceive aa "unix commands", however they are just standalone programs.
For example: If you run a Terminal on a Mac, it runs bash shell by default. Then if you type
date
, the shell will find it is not an internal shell command, so it will search the disk (it will search only in places defined in a so called "PATH environment variable") and it will most likely find a program in the following place/bin/date
. The shell will execute this program. The Terminal will then print the standard output of thedate
command in its window.iTerm2 does not use Terminal in the background, but it will run the same shell. So the flow is: iTerm2 runs bash (by default), bash then executes a
date
command anddate
command will send its output to the iTerm2 which will display the characters for the user.