Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
Index: Commands/Lookup Cocoa Class.plist =================================================================== --- Commands/Lookup Cocoa Class.plist (revision 9547) +++ Commands/Lookup Cocoa Class.plist (working copy) @@ -5,7 +5,12 @@ <key>beforeRunningCommand</key> <string>nop</string> <key>command</key> - <string>doc_path="/Developer/ADC Reference Library/documentation/Cocoa/Reference" + <string>if [[ $(defaults read /System/Library/CoreServices/SystemVersion ProductVersion) == 10.5.* ]]; then + "${TM_RUBY:-ruby}" -r"$TM_BUNDLE_SUPPORT/lib/docset_query.rb" -e 'documentation_for_word' + exit +fi + +doc_path="/Developer/ADC Reference Library/documentation/Cocoa/Reference" doc_path2="/Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.CoreReference.docset/Contents/Resources/Documents/documentation/Cocoa/Reference" if [[ -d "$doc_path2" ]]; then Index: Commands/Documentation for Selector.tmCommand =================================================================== --- Commands/Documentation for Selector.tmCommand (revision 9547) +++ Commands/Documentation for Selector.tmCommand (working copy) @@ -9,6 +9,12 @@ <key>command</key> <string>#!/usr/bin/env ruby +if `$(defaults read /System/Library/CoreServices/SystemVersion ProductVersion)` !~ /10\.4\..*/ + require ENV['TM_BUNDLE_SUPPORT'] + '/lib/docset_query.rb' + documentation_for_selector + exit +end + line = STDIN.read caret_placement = 0 tmp = ENV['TM_LINE_NUMBER'].to_i - ENV['TM_INPUT_START_LINE'].to_i
From the Design Piracy series on my blog: