Wrapping ‘defaults’ to be more flexible…
So I don’t know about any of you, gentle readers, but ‘defaults’ really gives me the shits sometimes.
Exhibit A:
/ $ defaults read /Library/Preferences/com.apple.loginwindow.plist
2007-11-21 13:12:04.288 defaults[97501:10b]
Domain com.apple.loginwindow.plist does not exist
/ $ defaults read /Library/Preferences/com.apple.loginwindow
(snip actual working output)
Exhibit B:
/ $ cd /Library/Preferences
/Library/Preferences $ defaults read ./com.apple.loginwindow.plist
2007-11-21 13:13:24.327 defaults[97540:10b]
Domain ./com.apple.loginwindow.plist does not exist
/Library/Preferences $ defaults read ./com.apple.loginwindow
2007-11-21 [...]