# Mac OS X Hints for 10.6 Snow Leopard

by on January 13, 2011

As we look forward to the days of Mac OS 10.7 Lion (Summer 2011) and a flood of hints on how to take advantage of new features in Lion at Mac OS X Hints, I thought it would be a good idea to share the list (from my bookmarks) of my favorite hints  since 10.6 Snow Leopard came out in August 2009. Since Snow Leopard was the first major OS X release that was not a core change in the OS over 10.5 Leopard, most of the hints for 10.5 should still apply; so this is not an exhaustive list. Also, I would like to add that this selection is biased by my computing practices and when I read the hint.

How to assign X11 to a Space

Add wireless networks from command line

Using Quick Look from the Command Line

Execute small bits from the clipboard in Terminal

Create on-the-fly hostname lists for ssh tab completion

Copy a file to all subfolders of a folder with one command

Simple word and character count for TextEdit

Ten different ways to connect to servers

Preview – add an image to a PDF file

Add smart scroll bar capabilities to Stickies

Add a ‘recent things’ stack to the Dock

Peek inside zip files with a Quick Look plug-in

A long list of modifier key tricks

Focus on an individual window within Spaces overview

Spotlight searching customization tips

Create a Thunderbird-like mail archiving feature in Mail

Convert Numbers sheets into Keynote slides via AppleScript

Set time of deletion for files placed in the Trash

1 Jonathan Irwin January 13, 2011 at 10:03 am

The ssh trick is a fairly neat one so I was inspired to figure out how to do the same thing in tcsh, because there are still a lot of astronomers out there using this shell (yeah, I know, the best advice I could give is “don’t” especially if you want to “ScriptBetter”, but sometimes there no choice, I regularly use several data processing environments that require a csh variant).

This two-liner appears to do the trick for me. I couldn’t easily figure out how to escape the /’s so cheated and used another variable, but if anybody has a more elegant one, I’d be curious to see it. The escaping is pretty hideous too and makes it difficult to read.

set known_hosts=~/.ssh/known_hosts
complete ssh 'p/*/awk \{sub$\",.\*\",\"\",\1$\;print\ \$1\}$known_hosts/'


This is actually not ideal for the way I usually use ssh and scp (username@hostname – my institution forces me to use a different username on their computers from all of my others) but this can be dealt with by hacking in .ssh/config to supply the correct default usernames for each host.

Note – in tcsh you can hit ^D (that’s control-D) to see all possible completions, although note that this doesn’t work until you have typed a character – if you do it on a blank commandline it will quit the shell unless you have ignoreeof set. Some people seem to think only bash has this feature (where you just hit tab twice) but it’s not true. You can also “set autolist” to automatically list possible completions after an ambiguous tab attempt instead.