My Terminal is awesome, has every detail just right (for me anyway), and now I'm setting up a few new macs around here and I have no idea whatsoever how to get their terminals to a pretty state. My user account is rather old, has been migrated over many OS X releases and machines, so my Terminal setup has grown rather organically over the years.
What I need is a recipe to start from scratch, so 1) I know what I've done, and 2) I can reproduce it anywhere.
Things I'm looking for:
- Full UTF8 support. Setting
LC_*
, displaying characters correctly, accepting input… I hear this got much easier in 10.5, maybe it all works out of the box now? - Setup of OS X-style keyboard text navigation (option-arrows, etc)
- How you particularly handle meta-key support? (other than
ESC
'ing your way around) - Other things to help our n00bs get around in the shell, such as:
- List of useful default key bindings (
^A
,^D
, etc…) - Mac-specific
.profile
,.inputrc
goodness - Mac-specific tools such as
pbpaste
&pbcopy
, Open Terminal Here, etc
- List of useful default key bindings (
- If at all possible, a list of files to copy over to another machine that encompasses all the changes made to tune the Terminal. (dotrc files, plists, etc)
- And, well, anything else really. Just keep the scope on the Mac OS X Terminal application, rather than general unix setup and tools.
I think a collection of incomplete answers would be a good start. Post one or two things you remember having done, we'll vote them up, and after a few days I'll try to compile it all into a summary answer.
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
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.I just noticed that the Mac OS X Terminal accepts both control and meta (esc) Emacs keystrokes for navigation. Here is a partial list:
I wouldn't advise doing this for other people, and none of these reference your specific questions, but here is what I did to tweak Terminal to my liking:
ls
output won't look awful)Then you may want to set up a few themes. The IR_Black theme is nice.
Lastly, I'd install some programmer fonts. I like Droid Sans Mono, Envy Code R, and Inconsolata.
For Mac-specific tools, see: What are useful Command-line Commands on Mac OS X?
I customize my Terminal.app with a SIMBL plugin that adds the 'copy-on-select' feature. See http blog.s21g.com/articles/1077 and http github.com/genki/terminalcopyonselect/tree/master .