How to setup the Mac OS X Terminal so it's *just peachy*?

Solution 1:

Do nothing. Stick with the default unless there is a valid reason not to.

I see you mention setting up a new unix developer on a Mac. If this developer has any Mac experience, he'll be used to the default and will probably get confused if you've customized things. If you're writing software that ships out to customers, the customer will (usually) have the default configuration and so trying to debug on a system that is "unfamiliar" (i.e. not your comfy customized environment) can be very frustrating.

If (like me) you work with many different machines and operating systems you quickly learn the defaults for that system, what keyboard shortcuts are portable between systems, standard commands for each OS, etc.

What you really need to do here is get a new machine, see what doesn't work (looks like UTF-8 support is fine, I just checked on my Mac) and see if there are any valid reasons for making changes. Developers have their own preferences when it comes to the command line and really don't appreciate being forced into using what someone else thinks is an "ideal setup". It might be ideal for you, but Apple are pretty damn good at figuring out sensible defaults.

The only thing I'd really change by default when setting up a new Mac, is making the Tab key cycle through all controls (including buttons) rather than just text boxes and lists. I know it's not terminal-related, but it does make a huge difference for us keyboard junkies who rarely lift their hand to use a mouse :)

Keyboard & Mouse > Keyboard Shortcuts > Full keyboard access > All Controls

Solution 2:

For your Terminal window settings just copy com.apple.Terminal.plist from your Preferences folder. That's everything specific to Mac OS X Terminal's application. Everything else is tweaking your shell, and it's settings so what you're asking for isn't easily done - it'd be much easier to add features as they are missing and documenting as you migrate from one computer to another.

However, for specific preferences spread across the different UNIX utilities is different for each one. If you wanted a blanket that will get the majority of settings you could conceivably just copy any file or folder that starts with a . in your home directory but it's far from ideal.

On a side note pbpaste/pbcopy are both system utilities so they don't need to be copied, Open Terminal Here is an AppleScript application.

Solution 3:

List of useful default key bindings (^A, ^D, etc…)

I just noticed that the Mac OS X Terminal accepts both control and meta (esc) Emacs keystrokes for navigation. Here is a partial list:

C-a  Move the cursor to the start of the line
C-e  Move the cursor to the end of the line
C-f  Move the cursor forward one character
C-b  Move the cursor backwards one character
M-f  Move the cursor forward one word
M-b  Move the cursor backwards one word
C-d  Delete the current character
M-d  Delete to the end of the word