I'm trying to autocomplete an OS X defaults domain. I type:
$ defaults write <TAB>
And I get lot of results, as you might imagine:
com.apple.AOSNotification.Accounts com.apple.ATS com.apple.ActivityMonitor com.apple.AddressBook com.apple.AddressBook.abd com.apple.AddressBookSourceSync com.apple.Aperture com.apple.AppleShareClient com.apple.Automator com.apple.Automator.LSSharedFileList com.apple.BezelServices com.apple.BluetoothAudio com.apple.CharacterPaletteIM com.apple.Console ...
Now, normally I might filter this list down by typing the first few letters of what I want and then completing again. Here, though, the interesting part of all of these is at the end of the word. I know the name of the application I'm looking for, which will be near the end of the word, but I'm not sure about the TLD that the full domain starts with (it might be a
net, or something else).
Surely the great zsh has some way to filter this list using a regex or glob, but I can't find it. What's the trick?