├── .gitmodules ├── JBShellView.xcodeproj └── project.pbxproj ├── JBShellView ├── JBAppDelegate.h ├── JBAppDelegate.m ├── JBShellCommandHistory.h ├── JBShellCommandHistory.m ├── JBShellContainerView.h ├── JBShellContainerView.m ├── JBShellView-Info.plist ├── JBShellView-Prefix.pch ├── JBShellView.h ├── JBShellView.m ├── JBShellViewBlockTypedefs.h ├── en.lproj │ ├── Credits.rtf │ ├── InfoPlist.strings │ └── MainMenu.xib └── main.m ├── License.md ├── jbshellview@2x.png └── readme.md /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "JBShellView/Libaries/parsekit"] 2 | path = JBShellView/Libaries/parsekit 3 | url = https://github.com/jbrennan/parsekit.git 4 | [submodule "JBShellView/Libaries/ModernCocoaText"] 5 | path = JBShellView/Libaries/ModernCocoaText 6 | url = https://github.com/jbrennan/ModernCocoaText.git 7 | -------------------------------------------------------------------------------- /JBShellView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | CD54ED8E166803AC002D997D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CD54ED8D166803AC002D997D /* Cocoa.framework */; }; 11 | CD54ED98166803AC002D997D /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = CD54ED96166803AC002D997D /* InfoPlist.strings */; }; 12 | CD54ED9A166803AC002D997D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CD54ED99166803AC002D997D /* main.m */; }; 13 | CD54ED9E166803AC002D997D /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = CD54ED9C166803AC002D997D /* Credits.rtf */; }; 14 | CD54EDA1166803AC002D997D /* JBAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CD54EDA0166803AC002D997D /* JBAppDelegate.m */; }; 15 | CD54EDA4166803AC002D997D /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = CD54EDA2166803AC002D997D /* MainMenu.xib */; }; 16 | CD54EDB11668052D002D997D /* JBTextEditorProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = CD54EDB01668052D002D997D /* JBTextEditorProcessor.m */; }; 17 | CD54EDD7166805C8002D997D /* JBShellView.m in Sources */ = {isa = PBXBuildFile; fileRef = CD54EDD1166805C8002D997D /* JBShellView.m */; }; 18 | CD54EDD8166805C8002D997D /* JBShellContainerView.m in Sources */ = {isa = PBXBuildFile; fileRef = CD54EDD3166805C8002D997D /* JBShellContainerView.m */; }; 19 | CD54EDD9166805C8002D997D /* JBShellCommandHistory.m in Sources */ = {isa = PBXBuildFile; fileRef = CD54EDD6166805C8002D997D /* JBShellCommandHistory.m */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | CD54EDC21668053A002D997D /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = CD54EDB216680539002D997D /* ParseKit.xcodeproj */; 26 | proxyType = 2; 27 | remoteGlobalIDString = 8DC2EF5B0486A6940098B216; 28 | remoteInfo = ParseKit; 29 | }; 30 | CD54EDC41668053A002D997D /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = CD54EDB216680539002D997D /* ParseKit.xcodeproj */; 33 | proxyType = 2; 34 | remoteGlobalIDString = D389F1CE0F1965E600558235; 35 | remoteInfo = JSParseKit; 36 | }; 37 | CD54EDC61668053A002D997D /* PBXContainerItemProxy */ = { 38 | isa = PBXContainerItemProxy; 39 | containerPortal = CD54EDB216680539002D997D /* ParseKit.xcodeproj */; 40 | proxyType = 2; 41 | remoteGlobalIDString = D3FDC5830FFC4BFC00F1F797; 42 | remoteInfo = ParseKitMobile; 43 | }; 44 | CD54EDC81668053A002D997D /* PBXContainerItemProxy */ = { 45 | isa = PBXContainerItemProxy; 46 | containerPortal = CD54EDB216680539002D997D /* ParseKit.xcodeproj */; 47 | proxyType = 2; 48 | remoteGlobalIDString = D37D8DC61571A4F700CDB822; 49 | remoteInfo = Tests; 50 | }; 51 | CD54EDCA1668053A002D997D /* PBXContainerItemProxy */ = { 52 | isa = PBXContainerItemProxy; 53 | containerPortal = CD54EDB216680539002D997D /* ParseKit.xcodeproj */; 54 | proxyType = 2; 55 | remoteGlobalIDString = D33494100E2963FD00406085; 56 | remoteInfo = DemoApp; 57 | }; 58 | CD54EDCC1668053A002D997D /* PBXContainerItemProxy */ = { 59 | isa = PBXContainerItemProxy; 60 | containerPortal = CD54EDB216680539002D997D /* ParseKit.xcodeproj */; 61 | proxyType = 2; 62 | remoteGlobalIDString = D34185040E520D3F0081B0DC; 63 | remoteInfo = DebugApp; 64 | }; 65 | CD54EDCE1668053A002D997D /* PBXContainerItemProxy */ = { 66 | isa = PBXContainerItemProxy; 67 | containerPortal = CD54EDB216680539002D997D /* ParseKit.xcodeproj */; 68 | proxyType = 2; 69 | remoteGlobalIDString = D389F2030F196A7500558235; 70 | remoteInfo = JSDemoApp; 71 | }; 72 | /* End PBXContainerItemProxy section */ 73 | 74 | /* Begin PBXFileReference section */ 75 | CD54ED89166803AC002D997D /* JBShellView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = JBShellView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 76 | CD54ED8D166803AC002D997D /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 77 | CD54ED90166803AC002D997D /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 78 | CD54ED91166803AC002D997D /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 79 | CD54ED92166803AC002D997D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 80 | CD54ED95166803AC002D997D /* JBShellView-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "JBShellView-Info.plist"; sourceTree = ""; }; 81 | CD54ED97166803AC002D997D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 82 | CD54ED99166803AC002D997D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 83 | CD54ED9B166803AC002D997D /* JBShellView-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "JBShellView-Prefix.pch"; sourceTree = ""; }; 84 | CD54ED9D166803AC002D997D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; 85 | CD54ED9F166803AC002D997D /* JBAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JBAppDelegate.h; sourceTree = ""; }; 86 | CD54EDA0166803AC002D997D /* JBAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JBAppDelegate.m; sourceTree = ""; }; 87 | CD54EDA3166803AC002D997D /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; 88 | CD54EDAF1668052D002D997D /* JBTextEditorProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JBTextEditorProcessor.h; path = ModernCocoaText/TextEditing/JBTextEditorProcessor.h; sourceTree = ""; }; 89 | CD54EDB01668052D002D997D /* JBTextEditorProcessor.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JBTextEditorProcessor.m; path = ModernCocoaText/TextEditing/JBTextEditorProcessor.m; sourceTree = ""; }; 90 | CD54EDB216680539002D997D /* ParseKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ParseKit.xcodeproj; path = parsekit/ParseKit.xcodeproj; sourceTree = ""; }; 91 | CD54EDD0166805C8002D997D /* JBShellView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JBShellView.h; sourceTree = ""; }; 92 | CD54EDD1166805C8002D997D /* JBShellView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JBShellView.m; sourceTree = ""; }; 93 | CD54EDD2166805C8002D997D /* JBShellContainerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JBShellContainerView.h; sourceTree = ""; }; 94 | CD54EDD3166805C8002D997D /* JBShellContainerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JBShellContainerView.m; sourceTree = ""; }; 95 | CD54EDD4166805C8002D997D /* JBShellViewBlockTypedefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JBShellViewBlockTypedefs.h; sourceTree = ""; }; 96 | CD54EDD5166805C8002D997D /* JBShellCommandHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JBShellCommandHistory.h; sourceTree = ""; }; 97 | CD54EDD6166805C8002D997D /* JBShellCommandHistory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JBShellCommandHistory.m; sourceTree = ""; }; 98 | /* End PBXFileReference section */ 99 | 100 | /* Begin PBXFrameworksBuildPhase section */ 101 | CD54ED86166803AC002D997D /* Frameworks */ = { 102 | isa = PBXFrameworksBuildPhase; 103 | buildActionMask = 2147483647; 104 | files = ( 105 | CD54ED8E166803AC002D997D /* Cocoa.framework in Frameworks */, 106 | ); 107 | runOnlyForDeploymentPostprocessing = 0; 108 | }; 109 | /* End PBXFrameworksBuildPhase section */ 110 | 111 | /* Begin PBXGroup section */ 112 | CD54ED7E166803AC002D997D = { 113 | isa = PBXGroup; 114 | children = ( 115 | CD54ED93166803AC002D997D /* JBShellView */, 116 | CD54ED8C166803AC002D997D /* Frameworks */, 117 | CD54ED8A166803AC002D997D /* Products */, 118 | ); 119 | sourceTree = ""; 120 | }; 121 | CD54ED8A166803AC002D997D /* Products */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | CD54ED89166803AC002D997D /* JBShellView.app */, 125 | ); 126 | name = Products; 127 | sourceTree = ""; 128 | }; 129 | CD54ED8C166803AC002D997D /* Frameworks */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | CD54ED8D166803AC002D997D /* Cocoa.framework */, 133 | CD54ED8F166803AC002D997D /* Other Frameworks */, 134 | ); 135 | name = Frameworks; 136 | sourceTree = ""; 137 | }; 138 | CD54ED8F166803AC002D997D /* Other Frameworks */ = { 139 | isa = PBXGroup; 140 | children = ( 141 | CD54ED90166803AC002D997D /* AppKit.framework */, 142 | CD54ED91166803AC002D997D /* CoreData.framework */, 143 | CD54ED92166803AC002D997D /* Foundation.framework */, 144 | ); 145 | name = "Other Frameworks"; 146 | sourceTree = ""; 147 | }; 148 | CD54ED93166803AC002D997D /* JBShellView */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | CD54EDAA166803B7002D997D /* Libraries */, 152 | CD54ED9F166803AC002D997D /* JBAppDelegate.h */, 153 | CD54EDA0166803AC002D997D /* JBAppDelegate.m */, 154 | CD54EDA2166803AC002D997D /* MainMenu.xib */, 155 | CD54EDD0166805C8002D997D /* JBShellView.h */, 156 | CD54EDD1166805C8002D997D /* JBShellView.m */, 157 | CD54EDD2166805C8002D997D /* JBShellContainerView.h */, 158 | CD54EDD3166805C8002D997D /* JBShellContainerView.m */, 159 | CD54EDD4166805C8002D997D /* JBShellViewBlockTypedefs.h */, 160 | CD54EDD5166805C8002D997D /* JBShellCommandHistory.h */, 161 | CD54EDD6166805C8002D997D /* JBShellCommandHistory.m */, 162 | CD54ED94166803AC002D997D /* Supporting Files */, 163 | ); 164 | path = JBShellView; 165 | sourceTree = ""; 166 | }; 167 | CD54ED94166803AC002D997D /* Supporting Files */ = { 168 | isa = PBXGroup; 169 | children = ( 170 | CD54ED95166803AC002D997D /* JBShellView-Info.plist */, 171 | CD54ED96166803AC002D997D /* InfoPlist.strings */, 172 | CD54ED99166803AC002D997D /* main.m */, 173 | CD54ED9B166803AC002D997D /* JBShellView-Prefix.pch */, 174 | CD54ED9C166803AC002D997D /* Credits.rtf */, 175 | ); 176 | name = "Supporting Files"; 177 | sourceTree = ""; 178 | }; 179 | CD54EDAA166803B7002D997D /* Libraries */ = { 180 | isa = PBXGroup; 181 | children = ( 182 | CD54EDB216680539002D997D /* ParseKit.xcodeproj */, 183 | CD54EDAB166804DD002D997D /* JBTextProcessor */, 184 | ); 185 | name = Libraries; 186 | path = Libaries; 187 | sourceTree = ""; 188 | }; 189 | CD54EDAB166804DD002D997D /* JBTextProcessor */ = { 190 | isa = PBXGroup; 191 | children = ( 192 | CD54EDAF1668052D002D997D /* JBTextEditorProcessor.h */, 193 | CD54EDB01668052D002D997D /* JBTextEditorProcessor.m */, 194 | ); 195 | name = JBTextProcessor; 196 | sourceTree = ""; 197 | }; 198 | CD54EDB316680539002D997D /* Products */ = { 199 | isa = PBXGroup; 200 | children = ( 201 | CD54EDC31668053A002D997D /* ParseKit.framework */, 202 | CD54EDC51668053A002D997D /* JSParseKit.framework */, 203 | CD54EDC71668053A002D997D /* libparsekit.a */, 204 | CD54EDC91668053A002D997D /* Tests.octest */, 205 | CD54EDCB1668053A002D997D /* DemoApp.app */, 206 | CD54EDCD1668053A002D997D /* DebugApp.app */, 207 | CD54EDCF1668053A002D997D /* JSDemoApp.app */, 208 | ); 209 | name = Products; 210 | sourceTree = ""; 211 | }; 212 | /* End PBXGroup section */ 213 | 214 | /* Begin PBXNativeTarget section */ 215 | CD54ED88166803AC002D997D /* JBShellView */ = { 216 | isa = PBXNativeTarget; 217 | buildConfigurationList = CD54EDA7166803AC002D997D /* Build configuration list for PBXNativeTarget "JBShellView" */; 218 | buildPhases = ( 219 | CD54ED85166803AC002D997D /* Sources */, 220 | CD54ED86166803AC002D997D /* Frameworks */, 221 | CD54ED87166803AC002D997D /* Resources */, 222 | ); 223 | buildRules = ( 224 | ); 225 | dependencies = ( 226 | ); 227 | name = JBShellView; 228 | productName = JBShellView; 229 | productReference = CD54ED89166803AC002D997D /* JBShellView.app */; 230 | productType = "com.apple.product-type.application"; 231 | }; 232 | /* End PBXNativeTarget section */ 233 | 234 | /* Begin PBXProject section */ 235 | CD54ED80166803AC002D997D /* Project object */ = { 236 | isa = PBXProject; 237 | attributes = { 238 | CLASSPREFIX = JB; 239 | LastUpgradeCheck = 0450; 240 | ORGANIZATIONNAME = "Jason Brennan"; 241 | }; 242 | buildConfigurationList = CD54ED83166803AC002D997D /* Build configuration list for PBXProject "JBShellView" */; 243 | compatibilityVersion = "Xcode 3.2"; 244 | developmentRegion = English; 245 | hasScannedForEncodings = 0; 246 | knownRegions = ( 247 | en, 248 | ); 249 | mainGroup = CD54ED7E166803AC002D997D; 250 | productRefGroup = CD54ED8A166803AC002D997D /* Products */; 251 | projectDirPath = ""; 252 | projectReferences = ( 253 | { 254 | ProductGroup = CD54EDB316680539002D997D /* Products */; 255 | ProjectRef = CD54EDB216680539002D997D /* ParseKit.xcodeproj */; 256 | }, 257 | ); 258 | projectRoot = ""; 259 | targets = ( 260 | CD54ED88166803AC002D997D /* JBShellView */, 261 | ); 262 | }; 263 | /* End PBXProject section */ 264 | 265 | /* Begin PBXReferenceProxy section */ 266 | CD54EDC31668053A002D997D /* ParseKit.framework */ = { 267 | isa = PBXReferenceProxy; 268 | fileType = wrapper.framework; 269 | path = ParseKit.framework; 270 | remoteRef = CD54EDC21668053A002D997D /* PBXContainerItemProxy */; 271 | sourceTree = BUILT_PRODUCTS_DIR; 272 | }; 273 | CD54EDC51668053A002D997D /* JSParseKit.framework */ = { 274 | isa = PBXReferenceProxy; 275 | fileType = wrapper.framework; 276 | path = JSParseKit.framework; 277 | remoteRef = CD54EDC41668053A002D997D /* PBXContainerItemProxy */; 278 | sourceTree = BUILT_PRODUCTS_DIR; 279 | }; 280 | CD54EDC71668053A002D997D /* libparsekit.a */ = { 281 | isa = PBXReferenceProxy; 282 | fileType = archive.ar; 283 | path = libparsekit.a; 284 | remoteRef = CD54EDC61668053A002D997D /* PBXContainerItemProxy */; 285 | sourceTree = BUILT_PRODUCTS_DIR; 286 | }; 287 | CD54EDC91668053A002D997D /* Tests.octest */ = { 288 | isa = PBXReferenceProxy; 289 | fileType = wrapper.cfbundle; 290 | path = Tests.octest; 291 | remoteRef = CD54EDC81668053A002D997D /* PBXContainerItemProxy */; 292 | sourceTree = BUILT_PRODUCTS_DIR; 293 | }; 294 | CD54EDCB1668053A002D997D /* DemoApp.app */ = { 295 | isa = PBXReferenceProxy; 296 | fileType = wrapper.application; 297 | path = DemoApp.app; 298 | remoteRef = CD54EDCA1668053A002D997D /* PBXContainerItemProxy */; 299 | sourceTree = BUILT_PRODUCTS_DIR; 300 | }; 301 | CD54EDCD1668053A002D997D /* DebugApp.app */ = { 302 | isa = PBXReferenceProxy; 303 | fileType = wrapper.application; 304 | path = DebugApp.app; 305 | remoteRef = CD54EDCC1668053A002D997D /* PBXContainerItemProxy */; 306 | sourceTree = BUILT_PRODUCTS_DIR; 307 | }; 308 | CD54EDCF1668053A002D997D /* JSDemoApp.app */ = { 309 | isa = PBXReferenceProxy; 310 | fileType = wrapper.application; 311 | path = JSDemoApp.app; 312 | remoteRef = CD54EDCE1668053A002D997D /* PBXContainerItemProxy */; 313 | sourceTree = BUILT_PRODUCTS_DIR; 314 | }; 315 | /* End PBXReferenceProxy section */ 316 | 317 | /* Begin PBXResourcesBuildPhase section */ 318 | CD54ED87166803AC002D997D /* Resources */ = { 319 | isa = PBXResourcesBuildPhase; 320 | buildActionMask = 2147483647; 321 | files = ( 322 | CD54ED98166803AC002D997D /* InfoPlist.strings in Resources */, 323 | CD54ED9E166803AC002D997D /* Credits.rtf in Resources */, 324 | CD54EDA4166803AC002D997D /* MainMenu.xib in Resources */, 325 | ); 326 | runOnlyForDeploymentPostprocessing = 0; 327 | }; 328 | /* End PBXResourcesBuildPhase section */ 329 | 330 | /* Begin PBXSourcesBuildPhase section */ 331 | CD54ED85166803AC002D997D /* Sources */ = { 332 | isa = PBXSourcesBuildPhase; 333 | buildActionMask = 2147483647; 334 | files = ( 335 | CD54ED9A166803AC002D997D /* main.m in Sources */, 336 | CD54EDA1166803AC002D997D /* JBAppDelegate.m in Sources */, 337 | CD54EDB11668052D002D997D /* JBTextEditorProcessor.m in Sources */, 338 | CD54EDD7166805C8002D997D /* JBShellView.m in Sources */, 339 | CD54EDD8166805C8002D997D /* JBShellContainerView.m in Sources */, 340 | CD54EDD9166805C8002D997D /* JBShellCommandHistory.m in Sources */, 341 | ); 342 | runOnlyForDeploymentPostprocessing = 0; 343 | }; 344 | /* End PBXSourcesBuildPhase section */ 345 | 346 | /* Begin PBXVariantGroup section */ 347 | CD54ED96166803AC002D997D /* InfoPlist.strings */ = { 348 | isa = PBXVariantGroup; 349 | children = ( 350 | CD54ED97166803AC002D997D /* en */, 351 | ); 352 | name = InfoPlist.strings; 353 | sourceTree = ""; 354 | }; 355 | CD54ED9C166803AC002D997D /* Credits.rtf */ = { 356 | isa = PBXVariantGroup; 357 | children = ( 358 | CD54ED9D166803AC002D997D /* en */, 359 | ); 360 | name = Credits.rtf; 361 | sourceTree = ""; 362 | }; 363 | CD54EDA2166803AC002D997D /* MainMenu.xib */ = { 364 | isa = PBXVariantGroup; 365 | children = ( 366 | CD54EDA3166803AC002D997D /* en */, 367 | ); 368 | name = MainMenu.xib; 369 | sourceTree = ""; 370 | }; 371 | /* End PBXVariantGroup section */ 372 | 373 | /* Begin XCBuildConfiguration section */ 374 | CD54EDA5166803AC002D997D /* Debug */ = { 375 | isa = XCBuildConfiguration; 376 | buildSettings = { 377 | ALWAYS_SEARCH_USER_PATHS = NO; 378 | ARCHS = "$(ARCHS_STANDARD_64_BIT)"; 379 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 380 | CLANG_CXX_LIBRARY = "libc++"; 381 | CLANG_ENABLE_OBJC_ARC = YES; 382 | CLANG_WARN_EMPTY_BODY = YES; 383 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 384 | COPY_PHASE_STRIP = NO; 385 | GCC_C_LANGUAGE_STANDARD = gnu99; 386 | GCC_DYNAMIC_NO_PIC = NO; 387 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 388 | GCC_OPTIMIZATION_LEVEL = 0; 389 | GCC_PREPROCESSOR_DEFINITIONS = ( 390 | "DEBUG=1", 391 | "$(inherited)", 392 | ); 393 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 394 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 395 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 396 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 397 | GCC_WARN_UNUSED_VARIABLE = YES; 398 | MACOSX_DEPLOYMENT_TARGET = 10.8; 399 | ONLY_ACTIVE_ARCH = YES; 400 | SDKROOT = macosx; 401 | }; 402 | name = Debug; 403 | }; 404 | CD54EDA6166803AC002D997D /* Release */ = { 405 | isa = XCBuildConfiguration; 406 | buildSettings = { 407 | ALWAYS_SEARCH_USER_PATHS = NO; 408 | ARCHS = "$(ARCHS_STANDARD_64_BIT)"; 409 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 410 | CLANG_CXX_LIBRARY = "libc++"; 411 | CLANG_ENABLE_OBJC_ARC = YES; 412 | CLANG_WARN_EMPTY_BODY = YES; 413 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 414 | COPY_PHASE_STRIP = YES; 415 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 416 | GCC_C_LANGUAGE_STANDARD = gnu99; 417 | GCC_ENABLE_OBJC_EXCEPTIONS = YES; 418 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 419 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 420 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 421 | GCC_WARN_UNUSED_VARIABLE = YES; 422 | MACOSX_DEPLOYMENT_TARGET = 10.8; 423 | SDKROOT = macosx; 424 | }; 425 | name = Release; 426 | }; 427 | CD54EDA8166803AC002D997D /* Debug */ = { 428 | isa = XCBuildConfiguration; 429 | buildSettings = { 430 | COMBINE_HIDPI_IMAGES = YES; 431 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 432 | GCC_PREFIX_HEADER = "JBShellView/JBShellView-Prefix.pch"; 433 | INFOPLIST_FILE = "JBShellView/JBShellView-Info.plist"; 434 | PRODUCT_NAME = "$(TARGET_NAME)"; 435 | WRAPPER_EXTENSION = app; 436 | }; 437 | name = Debug; 438 | }; 439 | CD54EDA9166803AC002D997D /* Release */ = { 440 | isa = XCBuildConfiguration; 441 | buildSettings = { 442 | COMBINE_HIDPI_IMAGES = YES; 443 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 444 | GCC_PREFIX_HEADER = "JBShellView/JBShellView-Prefix.pch"; 445 | INFOPLIST_FILE = "JBShellView/JBShellView-Info.plist"; 446 | PRODUCT_NAME = "$(TARGET_NAME)"; 447 | WRAPPER_EXTENSION = app; 448 | }; 449 | name = Release; 450 | }; 451 | /* End XCBuildConfiguration section */ 452 | 453 | /* Begin XCConfigurationList section */ 454 | CD54ED83166803AC002D997D /* Build configuration list for PBXProject "JBShellView" */ = { 455 | isa = XCConfigurationList; 456 | buildConfigurations = ( 457 | CD54EDA5166803AC002D997D /* Debug */, 458 | CD54EDA6166803AC002D997D /* Release */, 459 | ); 460 | defaultConfigurationIsVisible = 0; 461 | defaultConfigurationName = Release; 462 | }; 463 | CD54EDA7166803AC002D997D /* Build configuration list for PBXNativeTarget "JBShellView" */ = { 464 | isa = XCConfigurationList; 465 | buildConfigurations = ( 466 | CD54EDA8166803AC002D997D /* Debug */, 467 | CD54EDA9166803AC002D997D /* Release */, 468 | ); 469 | defaultConfigurationIsVisible = 0; 470 | }; 471 | /* End XCConfigurationList section */ 472 | }; 473 | rootObject = CD54ED80166803AC002D997D /* Project object */; 474 | } 475 | -------------------------------------------------------------------------------- /JBShellView/JBAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // JBAppDelegate.h 3 | // JBShellView 4 | // 5 | // Created by Jason Brennan on 2012-11-29. 6 | // Copyright (c) 2012 Jason Brennan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface JBAppDelegate : NSObject 12 | 13 | @property (assign) IBOutlet NSWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /JBShellView/JBAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // JBAppDelegate.m 3 | // JBShellView 4 | // 5 | // Created by Jason Brennan on 2012-11-29. 6 | // Copyright (c) 2012 Jason Brennan. All rights reserved. 7 | // 8 | 9 | #import "JBAppDelegate.h" 10 | #import "JBShellContainerView.h" 11 | #import "JBShellView.h" 12 | 13 | #define kSearchString @"search " 14 | 15 | 16 | @interface JBAppDelegate () 17 | @property (nonatomic, strong) JBShellContainerView *shellContainer; 18 | @end 19 | 20 | 21 | @implementation JBAppDelegate 22 | 23 | - (void)applicationDidFinishLaunching:(NSNotification *)notification { 24 | CGRect bounds = [[self.window contentView] bounds]; 25 | NSString *prompt = [NSString stringWithFormat:@"%@> ", @"JBShellView"]; 26 | 27 | 28 | self.shellContainer = [[JBShellContainerView alloc] initWithFrame:bounds shellViewClass:nil prompt:prompt shellInputProcessingHandler:^(NSString *input, JBShellView *sender) { 29 | 30 | if ([input hasPrefix:kSearchString]) { 31 | // If you're doing a long operation, use this and make sure to end it when you're done. 32 | [sender beginDelayedOutputMode]; 33 | 34 | // Do some potentially long asynchronous task and append any output 35 | NSInteger index = NSMaxRange([input rangeOfString:kSearchString]); 36 | NSString *query = [[input substringFromIndex:index] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; 37 | NSString *url = [NSString stringWithFormat:@"http://api.duckduckgo.com/?q=%@&format=json", query]; 38 | NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:url]]; 39 | 40 | [NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) { 41 | if (error) { 42 | [sender showErrorOutput:@"Error searching" errorRange:NSMakeRange(0, [input length])]; 43 | } else { 44 | NSDictionary *results = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:NULL]; 45 | NSArray *relatedTopics = [results valueForKey:@"RelatedTopics"]; 46 | if ([relatedTopics count]) { 47 | NSDictionary *firstResult = relatedTopics[0]; 48 | [sender appendOutputWithNewlines:firstResult[@"Text"]]; 49 | } else { 50 | [sender appendOutputWithNewlines:@"No results"]; 51 | } 52 | } 53 | // Call this when the task is done 54 | [sender endDelayedOutputMode]; 55 | }]; 56 | 57 | } else { 58 | [sender appendOutputWithNewlines:@"Try 'search Kubrick'"]; 59 | } 60 | }]; 61 | 62 | 63 | [[[self window] contentView] addSubview:self.shellContainer]; 64 | [self.window makeFirstResponder:self.shellContainer.shellView]; 65 | } 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /JBShellView/JBShellCommandHistory.h: -------------------------------------------------------------------------------- 1 | // 2 | // JBShellCommandHistory.h 3 | // Super Debug 4 | // 5 | // Created by Jason Brennan on 12-07-20. 6 | // Copyright (c) 2012 Jason Brennan. All rights reserved. 7 | // 8 | // A stack representing the history of our command shell. 9 | 10 | #import 11 | 12 | @interface JBShellCommandHistory : NSObject 13 | 14 | - (void)addCommand:(NSString *)command forRange:(NSRange)commandRange; 15 | - (id)moveToFirst; // chainable 16 | - (id)moveToLast; // chainable 17 | - (id)moveToPreviousCommand; // chainable 18 | - (id)moveToNextHistoryCommand; // chainable 19 | - (NSString *)topCommand; // the most recently added command 20 | - (NSString *)currentCommand; // the command at the current stack pointer 21 | - (NSString *)commandAtIndex:(NSUInteger)index; // returns nil if index is out of bounds 22 | - (NSString *)commandForRange:(NSRange)range; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /JBShellView/JBShellCommandHistory.m: -------------------------------------------------------------------------------- 1 | // 2 | // JBShellCommandHistory.m 3 | // Super Debug 4 | // 5 | // Created by Jason Brennan on 12-07-20. 6 | // Copyright (c) 2012 Jason Brennan. All rights reserved. 7 | // 8 | 9 | #import "JBShellCommandHistory.h" 10 | 11 | #define kCommandKey @"command" 12 | #define kRangeKey @"range" 13 | 14 | @implementation JBShellCommandHistory { 15 | NSUInteger _head, _currentCommand; 16 | NSMutableArray *_stack; 17 | } 18 | 19 | 20 | - (id)init { 21 | self = [super init]; 22 | if (self) { 23 | _stack = [NSMutableArray array]; 24 | } 25 | return self; 26 | } 27 | 28 | 29 | - (NSString *)description { 30 | return [NSString stringWithFormat:@"Command history:\n%@\nTop command: %@", _stack, [self topCommand]]; 31 | } 32 | 33 | 34 | - (void)addCommand:(NSString *)command forRange:(NSRange)commandRange { 35 | 36 | NSDictionary *d = @{ kCommandKey : command, kRangeKey : NSStringFromRange(commandRange) }; 37 | 38 | [_stack addObject:d]; 39 | } 40 | 41 | 42 | - (id)moveToFirst { 43 | _currentCommand = 0; 44 | return self; 45 | } 46 | 47 | 48 | - (id)moveToLast { 49 | _currentCommand = [_stack count];// - 1; 50 | return self; 51 | } 52 | 53 | 54 | - (id)moveToPreviousCommand { 55 | if (_currentCommand > 0) { 56 | _currentCommand--; 57 | } 58 | return self; 59 | } 60 | 61 | 62 | - (id)moveToNextHistoryCommand { 63 | if (_currentCommand < [_stack count]) 64 | _currentCommand++; 65 | return self; 66 | } 67 | 68 | 69 | - (NSString *)topCommand { 70 | return [[_stack lastObject] objectForKey:kCommandKey]; 71 | } 72 | 73 | 74 | - (NSString *)currentCommand { 75 | return _currentCommand < [_stack count] ? [_stack[_currentCommand] objectForKey:kCommandKey] : @""; 76 | } 77 | 78 | 79 | - (NSString *)commandAtIndex:(NSUInteger)index { 80 | if (index >= [_stack count]) { 81 | return nil; 82 | } 83 | 84 | return [_stack[index] objectForKey:kCommandKey]; 85 | } 86 | 87 | 88 | - (NSString *)commandForRange:(NSRange)range { 89 | for (NSDictionary *dictionary in _stack) { 90 | 91 | NSRange cRange = NSRangeFromString([dictionary objectForKey:kRangeKey]); 92 | if (RangeContainsRange(cRange, range)) { 93 | return [dictionary objectForKey:kCommandKey]; 94 | } 95 | 96 | if ([[dictionary objectForKey:kRangeKey] isEqualToString:NSStringFromRange(range)]) { 97 | return [dictionary objectForKey:kCommandKey]; 98 | } 99 | } 100 | return nil; 101 | } 102 | 103 | 104 | BOOL RangeContainsRange(NSRange a, NSRange b) { 105 | return (a.location <= b.location && NSMaxRange(a) >= NSMaxRange(b)); 106 | } 107 | 108 | 109 | @end 110 | -------------------------------------------------------------------------------- /JBShellView/JBShellContainerView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JBShellContainerView.h 3 | // TextViewShell 4 | // 5 | // Created by Jason Brennan on 12-07-14. 6 | // Copyright (c) 2012 Jason Brennan. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JBShellViewBlockTypedefs.h" 11 | 12 | @class JBShellView; 13 | @interface JBShellContainerView : NSView 14 | @property (strong) JBShellView *shellView; 15 | 16 | 17 | // If `shellViewClass` == nil then JBShellView is used 18 | - (id)initWithFrame:(NSRect)frameRect shellViewClass:(Class)shellViewClass prompt:(NSString *)prompt shellInputProcessingHandler:(JBShellViewInputProcessingHandler)inputProcessingHandler; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /JBShellView/JBShellContainerView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JBShellContainerView.m 3 | // TextViewShell 4 | // 5 | // Created by Jason Brennan on 12-07-14. 6 | // Copyright (c) 2012 Jason Brennan. All rights reserved. 7 | // 8 | 9 | #import "JBShellContainerView.h" 10 | #import "JBShellView.h" 11 | 12 | @implementation JBShellContainerView 13 | 14 | - (id)initWithFrame:(NSRect)frameRect shellViewClass:(Class)shellViewClass prompt:(NSString *)prompt shellInputProcessingHandler:(JBShellViewInputProcessingHandler)inputProcessingHandler 15 | { 16 | self = [super initWithFrame:frameRect]; 17 | if (self) { 18 | // Initialization code here. 19 | CGRect bounds = [self bounds]; 20 | NSScrollView *scrollView = [[NSScrollView alloc] initWithFrame:bounds]; 21 | [scrollView setBorderType:NSNoBorder]; 22 | [scrollView setHasVerticalScroller:YES]; 23 | [scrollView setHasHorizontalScroller:NO]; 24 | [scrollView setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; 25 | CGSize contentSize = [scrollView contentSize]; 26 | [scrollView setBackgroundColor:[NSColor whiteColor]]; 27 | 28 | if (shellViewClass == nil) shellViewClass = [JBShellView class]; 29 | JBShellView *shellView = [[shellViewClass alloc] initWithFrame:CGRectMake(0, 0, contentSize.width, contentSize.height) prompt:prompt inputHandler:inputProcessingHandler]; 30 | [shellView setAutoresizingMask:NSViewWidthSizable]; 31 | [shellView setMinSize:CGSizeMake(0.0f, contentSize.height)]; 32 | [shellView setMaxSize:CGSizeMake(1e7, 1e7)]; 33 | [shellView setVerticallyResizable:YES]; 34 | [shellView setHorizontallyResizable:NO]; 35 | [shellView setBackgroundColor:[NSColor whiteColor]]; 36 | [[shellView textContainer] setWidthTracksTextView:YES]; 37 | 38 | self.shellView = shellView; 39 | 40 | [scrollView setDocumentView:shellView]; 41 | [self addSubview:scrollView]; 42 | 43 | [self setAutoresizesSubviews:YES]; 44 | [self setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; 45 | 46 | [kJBShellViewErrorColor description]; 47 | } 48 | 49 | return self; 50 | } 51 | 52 | 53 | - (BOOL)becomeFirstResponder { 54 | return [self.shellView becomeFirstResponder]; 55 | } 56 | 57 | - (BOOL)canBecomeKeyView { 58 | return YES; 59 | } 60 | 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /JBShellView/JBShellView-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | com.jasonbrennan.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | ${MACOSX_DEPLOYMENT_TARGET} 27 | NSHumanReadableCopyright 28 | Copyright © 2012 Jason Brennan. All rights reserved. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /JBShellView/JBShellView-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'JBShellView' target in the 'JBShellView' project 3 | // 4 | 5 | #ifdef __OBJC__ 6 | #import 7 | #endif 8 | -------------------------------------------------------------------------------- /JBShellView/JBShellView.h: -------------------------------------------------------------------------------- 1 | // 2 | // JBShellView.h 3 | // TextViewShell 4 | // 5 | // Created by Jason Brennan on 12-07-14. 6 | // Copyright (c) 2012 Jason Brennan. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "JBShellViewBlockTypedefs.h" 11 | 12 | #define kJBShellViewErrorColor [JBShellView errorColor] 13 | #define kJBShellViewSuccessColor [JBShellView successColor] 14 | 15 | 16 | @class JBSuggestionWindowController; 17 | @class JBShellCommandHistory; 18 | @interface JBShellView : NSTextView 19 | 20 | @property (nonatomic, strong) NSString *prompt; 21 | @property (nonatomic, assign) NSUInteger commandStart; // The index for where input will be accepted in the textview (for subclasses to change) 22 | @property (nonatomic, strong, readonly) JBShellCommandHistory *commandHistory; 23 | @property (nonatomic, copy) JBShellViewInputProcessingHandler inputHandler; 24 | 25 | @property (nonatomic, copy) JBShellViewDragHandler numberDragHandler; // For subclasses 26 | @property (nonatomic, copy) JBShellViewDragHandler colorPickerDragHandler; 27 | 28 | @property (nonatomic, strong) JBSuggestionWindowController *suggestionWindowController; 29 | 30 | - (id)initWithFrame:(CGRect)frame prompt:(NSString *)prompt inputHandler:(JBShellViewInputProcessingHandler)inputHandler; 31 | 32 | - (void)appendOutput:(NSString *)output; // used for finer-grained control of output 33 | - (void)appendOutputWithNewlines:(NSString *)output; // Used for general output 34 | - (void)showErrorOutput:(NSString *)output errorRange:(NSRange)errorRange; 35 | 36 | - (void)appendAttributedOutput:(NSAttributedString *)attributedOutput; 37 | - (void)appendAttributedOutputWithNewLines:(NSAttributedString *)attributedOutput; 38 | 39 | + (NSColor *)errorColor; 40 | + (NSColor *)successColor; 41 | 42 | 43 | // Delayed output mode allows you to return from the inputHandler while still waiting for a task to complete, like a network operation. 44 | // This way, tasks can be run asynchronously and the prompt won't be added until -endDelayedOutputMode is called. 45 | - (void)beginDelayedOutputMode; 46 | - (void)endDelayedOutputMode; 47 | 48 | - (void)highlightText; 49 | 50 | @end 51 | -------------------------------------------------------------------------------- /JBShellView/JBShellView.m: -------------------------------------------------------------------------------- 1 | // 2 | // JBShellView.m 3 | // TextViewShell 4 | // 5 | // Created by Jason Brennan on 12-07-14. 6 | // Copyright (c) 2012 Jason Brennan. All rights reserved. 7 | // 8 | 9 | #import "JBShellView.h" 10 | #import "JBShellCommandHistory.h" 11 | #import "JBTextEditorProcessor.h" 12 | //#import "JBSuggestionWindowController.h" 13 | 14 | 15 | @interface JBShellView () 16 | 17 | @property (nonatomic, assign) NSUInteger lastCommandStart; 18 | @property (assign) BOOL delayedOutputMode; 19 | @property (assign) BOOL userEnteredText; 20 | @property (nonatomic, strong, readwrite) JBShellCommandHistory *commandHistory; 21 | @property (strong) JBTextEditorProcessor *textProcessor; 22 | 23 | @end 24 | 25 | @implementation JBShellView 26 | 27 | 28 | #pragma mark - Public API 29 | 30 | - (id)initWithFrame:(CGRect)frame prompt:(NSString *)prompt inputHandler:(JBShellViewInputProcessingHandler)inputHandler 31 | { 32 | self = [super initWithFrame:frame]; 33 | if (self) { 34 | 35 | self.prompt = prompt?: @"> "; 36 | self.inputHandler = [inputHandler copy]; 37 | self.textProcessor = [JBTextEditorProcessor new]; 38 | 39 | [self setContinuousSpellCheckingEnabled:NO]; 40 | 41 | [self setFont:[NSFont fontWithName:@"Menlo" size:18.0f]]; 42 | [self setTextContainerInset:CGSizeMake(5.0f, 5.0f)]; 43 | [self setDelegate:self]; 44 | [self setAllowsUndo:YES]; 45 | 46 | [self insertPrompt]; 47 | 48 | self.commandStart = [[self string] length]; 49 | self.commandHistory = [[JBShellCommandHistory alloc] init]; 50 | 51 | } 52 | 53 | return self; 54 | } 55 | 56 | 57 | - (id)initWithFrame:(NSRect)frameRect { 58 | // Example implementation of what it might look like. 59 | return [self initWithFrame:frameRect prompt:@"> " inputHandler:^(NSString *input, JBShellView *sender) { 60 | NSRange errorRange = [input rangeOfString:@"nwe"]; 61 | if (errorRange.location != NSNotFound) 62 | [sender showErrorOutput:@"Did you mean: new" errorRange:errorRange]; 63 | else { 64 | NSString *message = @"All good"; 65 | NSMutableAttributedString *output = [[NSMutableAttributedString alloc] initWithString:message]; 66 | NSDictionary *attributes = @{ NSBackgroundColorAttributeName : kJBShellViewSuccessColor, NSForegroundColorAttributeName : [NSColor whiteColor] }; 67 | [message enumerateSubstringsInRange:NSMakeRange(0, [message length]) options:NSStringEnumerationByWords usingBlock:^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) { 68 | if ([substring isEqualToString:@"good"]) { 69 | [output addAttributes:attributes range:substringRange]; 70 | } 71 | }]; 72 | [sender appendAttributedOutput:output]; 73 | } 74 | }]; 75 | } 76 | 77 | 78 | + (NSColor *)errorColor { 79 | return [NSColor colorWithCalibratedRed:1.000 green:0.314 blue:0.333 alpha:1.000]; 80 | } 81 | 82 | 83 | + (NSColor *)successColor { 84 | return [NSColor colorWithCalibratedRed:0.376 green:0.780 blue:0.000 alpha:1.000]; 85 | } 86 | 87 | 88 | - (void)setInputHandler:(JBShellViewInputProcessingHandler)inputHandler { 89 | _inputHandler = [inputHandler copy]; 90 | } 91 | 92 | 93 | - (void)appendOutput:(NSString *)output { 94 | [self moveToEndOfDocument:self]; 95 | [super insertText:output]; 96 | self.commandStart = [[self string] length]; 97 | [self scrollRangeToVisible:[self selectedRange]]; 98 | } 99 | 100 | 101 | - (void)appendOutputWithNewlines:(NSString *)output { 102 | [self appendOutput:[output stringByAppendingFormat:@"\n"]]; 103 | } 104 | 105 | 106 | - (void)showErrorOutput:(NSString *)output errorRange:(NSRange)errorRange { 107 | 108 | errorRange.location += self.lastCommandStart; 109 | 110 | 111 | // I don't understand this conditional. 112 | if (NSMaxRange(errorRange) >= [[self string] length] && errorRange.length > 1) { 113 | errorRange.length--; 114 | } 115 | 116 | if ([self shouldChangeTextInRange:errorRange replacementString:nil]) { 117 | NSTextStorage *textStorage = [self textStorage]; 118 | [textStorage beginEditing]; 119 | NSColor *errorColor = kJBShellViewErrorColor; 120 | NSDictionary *attributes = @{ NSForegroundColorAttributeName : [NSColor whiteColor], NSBackgroundColorAttributeName : errorColor }; 121 | [textStorage addAttributes:attributes range:errorRange]; 122 | [textStorage endEditing]; 123 | [self didChangeText]; 124 | } 125 | 126 | 127 | [self appendOutputWithNewlines:[NSString stringWithFormat:@"\n%@", output]]; 128 | } 129 | 130 | 131 | - (void)appendAttributedOutput:(NSAttributedString *)attributedOutput { 132 | [self moveToEndOfDocument:self]; 133 | [[self textStorage] appendAttributedString:attributedOutput]; 134 | self.commandStart = [[self string] length]; 135 | [self scrollRangeToVisible:[self selectedRange]]; 136 | } 137 | 138 | 139 | - (void)appendAttributedOutputWithNewLines:(NSAttributedString *)attributedOutput { 140 | 141 | } 142 | 143 | 144 | - (void)beginDelayedOutputMode { 145 | self.delayedOutputMode = YES; 146 | } 147 | 148 | 149 | - (void)endDelayedOutputMode { 150 | 151 | self.delayedOutputMode = NO; 152 | [self finishOutput]; 153 | 154 | } 155 | 156 | #pragma mark - NSTextView overrides 157 | 158 | 159 | - (BOOL)shouldChangeTextInRange:(NSRange)affectedCharRange replacementString:(NSString *)replacementString { 160 | // Do not accept a modification outside the current command start 161 | if (replacementString && affectedCharRange.location < self.commandStart) { 162 | NSBeep(); 163 | return NO; 164 | } else { 165 | self.userEnteredText = YES; 166 | return YES; 167 | } 168 | } 169 | 170 | 171 | - (void)keyDown:(NSEvent *)theEvent { 172 | if ([theEvent type] != NSKeyDown) { 173 | [super keyDown:theEvent]; 174 | return; 175 | } 176 | 177 | if (![[theEvent characters] length]) { 178 | // accent input, for example 179 | [super keyDown:theEvent]; 180 | return; 181 | } 182 | 183 | unichar character = [[theEvent characters] characterAtIndex:0]; 184 | NSUInteger modifierFlags = [theEvent modifierFlags]; 185 | BOOL arrowKey = (character == NSLeftArrowFunctionKey 186 | || character == NSRightArrowFunctionKey 187 | || character == NSUpArrowFunctionKey 188 | || character == NSDownArrowFunctionKey); 189 | 190 | // Is the insertion point greater than commandStart and also (not shift+arrow)? 191 | if ([self selectedRange].location < self.commandStart && !(modifierFlags & NSShiftKeyMask && (arrowKey))) { 192 | [self setSelectedRange:NSMakeRange(self.commandStart, 0)]; 193 | [self scrollRangeToVisible:[self selectedRange]]; 194 | } 195 | 196 | // When the control key is held down 197 | if (modifierFlags & NSControlKeyMask) { 198 | switch (character) { 199 | case NSCarriageReturnCharacter: 200 | [self insertNewlineIgnoringFieldEditor:self]; 201 | break; 202 | case NSDeleteCharacter: 203 | [self setSelectedRange:NSMakeRange(self.commandStart, [[self string] length])]; 204 | [self delete:self]; 205 | break; 206 | case NSUpArrowFunctionKey: 207 | [self replaceCurrentCommandWith:[[self.commandHistory moveToPreviousCommand] currentCommand]]; 208 | break; 209 | case NSDownArrowFunctionKey: 210 | [self replaceCurrentCommandWith:[[self.commandHistory moveToNextHistoryCommand] currentCommand]]; 211 | break; 212 | default: 213 | [super keyDown:theEvent]; 214 | break; 215 | } 216 | } else { 217 | switch (character) { 218 | case NSCarriageReturnCharacter: 219 | [self acceptInput]; 220 | break; 221 | default: 222 | [super keyDown:theEvent]; 223 | break; 224 | } 225 | } 226 | } 227 | 228 | 229 | - (NSArray *)readablePasteboardTypes { 230 | return @[ NSPasteboardTypeString ]; 231 | } 232 | 233 | 234 | - (void)insertText:(id)insertString { 235 | NSLog(@"inserting: %@", insertString); 236 | 237 | NSRange range = [self selectedRange]; 238 | if (![self shouldChangeTextInRange:NSMakeRange(range.location, range.length) replacementString:@""]) { 239 | return; 240 | } 241 | 242 | NSString *input = [self inputString]; 243 | 244 | NSString *deletedText = @""; 245 | if (range.length > 0) { 246 | deletedText = [[self string] substringWithRange:range]; 247 | } 248 | range.location -= self.commandStart; 249 | [self.textProcessor processString:input 250 | changedSelectionRange:range 251 | deletedString:deletedText 252 | insertedString:insertString 253 | completionHandler:^(NSString *processedText, NSRange newSelectedRange) { 254 | NSLog(@"Processed: %@", processedText); 255 | [self replaceCurrentCommandWith:processedText]; 256 | 257 | newSelectedRange.location += self.commandStart; 258 | [self setSelectedRange:newSelectedRange]; 259 | }]; 260 | } 261 | 262 | 263 | - (void)deleteBackward:(id)sender { 264 | 265 | NSRange range = [self selectedRange]; 266 | NSRange backwardRange = range; 267 | if (!backwardRange.length) { 268 | backwardRange.location -= 1; 269 | } 270 | if (![self shouldChangeTextInRange:backwardRange replacementString:@""]) { 271 | return; 272 | } 273 | 274 | NSString *input = [self inputString]; 275 | 276 | NSString *deletedText = [[self string] substringWithRange:range]; 277 | if (range.length < 1) { 278 | deletedText = [[self string] substringWithRange:NSMakeRange(range.location - 1, 1)]; 279 | range.length = 1; 280 | range.location -= 1; 281 | } 282 | 283 | range.location -= self.commandStart; 284 | 285 | [self.textProcessor processString:input 286 | changedSelectionRange:range 287 | deletedString:deletedText 288 | insertedString:@"" 289 | completionHandler:^(NSString *processedText, NSRange newSelectedRange) { 290 | 291 | [self replaceCurrentCommandWith:processedText]; 292 | 293 | newSelectedRange.location += self.commandStart; 294 | [self setSelectedRange:newSelectedRange]; 295 | }]; 296 | } 297 | 298 | 299 | #pragma mark - Movement 300 | 301 | - (void)moveToBeginningOfLine:(id)sender { 302 | [self setSelectedRange:[self commandStartRange]]; 303 | } 304 | 305 | 306 | - (void)moveToEndOfLine:(id)sender { 307 | [self moveToEndOfDocument:sender]; 308 | } 309 | 310 | 311 | - (void)moveToBeginningOfParagraph:(id)sender { 312 | [self setSelectedRange:[self commandStartRange]]; 313 | } 314 | 315 | 316 | - (void)moveToEndOfParagraph:(id)sender { 317 | [self moveToEndOfDocument:sender]; 318 | } 319 | 320 | 321 | - (void)moveLeft:(id)sender { 322 | if ([self selectedRange].location > self.commandStart) { 323 | [super moveLeft:sender]; 324 | } 325 | } 326 | 327 | 328 | - (void)moveUp:(id)sender { 329 | // If we are on the first line of the current command then replace current command with the previous one from history 330 | // else, apply the normal text editing behavior. 331 | 332 | NSUInteger oldLocation = [self selectedRange].location; 333 | [super moveUp:sender]; 334 | 335 | if ([self selectedRange].location < self.commandStart || [self selectedRange].location == oldLocation) { 336 | // moved before the start of command entry OR not moved because we are on the first line of the text view 337 | 338 | NSUInteger promptBottomLocation = self.commandStart - [self.prompt length]; 339 | NSUInteger promptEndLocation = self.commandStart; 340 | NSUInteger insertionLocation = [self selectedRange].location; 341 | 342 | if (insertionLocation >= promptBottomLocation && insertionLocation < promptEndLocation) { 343 | // Insertion point is on the prompt, so move to the start of the current command. 344 | [self setSelectedRange:[self commandStartRange]]; 345 | } else { 346 | [self saveEditedCommand]; 347 | [self replaceCurrentCommandWith:[[self.commandHistory moveToPreviousCommand] currentCommand]]; 348 | } 349 | } 350 | } 351 | 352 | 353 | - (void)moveDown:(id)sender { 354 | // If we are on the last line of the current command then replace current command with the next history item 355 | // else, apply the normal text editing behavior. 356 | NSUInteger oldLocation = [self selectedRange].location; 357 | [super moveDown:sender]; 358 | 359 | if ([self selectedRange].location == oldLocation || [self selectedRange].location == [[self string] length]) { 360 | // no movement OR move to end of the document because we are on the last line 361 | [self saveEditedCommand]; 362 | [self replaceCurrentCommandWith:[[self.commandHistory moveToNextHistoryCommand] currentCommand]]; 363 | } 364 | } 365 | 366 | 367 | #pragma mark - NSTextViewDelegate implementation 368 | 369 | 370 | - (BOOL)textView:(NSTextView *)textView doCommandBySelector:(SEL)commandSelector { 371 | 372 | // Unfinished support for a suggestions window 373 | // if (commandSelector == @selector(moveUp:)) { 374 | // return ![self.suggestionWindowController textViewShouldMoveUp:textView]; 375 | // } 376 | // 377 | // 378 | // if (commandSelector == @selector(moveDown:)) { 379 | // return ![self.suggestionWindowController textViewShouldMoveDown:textView]; 380 | // } 381 | 382 | // Returning no means the textView should handle it 383 | return NO; 384 | } 385 | 386 | 387 | #pragma mark - Private API 388 | 389 | - (NSRange)commandStartRange { 390 | return NSMakeRange(_commandStart, 0); 391 | } 392 | 393 | 394 | - (void)saveEditedCommand { 395 | if (!_userEnteredText) { 396 | return; 397 | } 398 | 399 | NSString *input = [[self string] substringFromIndex:_commandStart]; 400 | if ([input length] > 0 && ![input isEqualToString:[self.commandHistory topCommand]]) { 401 | NSRange range; 402 | 403 | range = NSMakeRange(_commandStart, [[self string] length] - _commandStart); 404 | 405 | NSLog(@"Before save: %@", self.commandHistory); 406 | [self.commandHistory addCommand:input forRange:range]; 407 | [self.commandHistory moveToPreviousCommand]; 408 | NSLog(@"After save: %@", self.commandHistory); 409 | } 410 | } 411 | 412 | - (void)replaceCurrentCommandWith:(NSString *)command { 413 | [self setSelectedRange:NSMakeRange(self.commandStart, [[self string] length])]; 414 | [super insertText:command]; 415 | [self moveToEndOfDocument:self]; 416 | [self scrollRangeToVisible:[self selectedRange]]; 417 | self.userEnteredText = NO; 418 | } 419 | 420 | 421 | - (void)acceptInput { 422 | NSLog(@"Accepting input!"); 423 | NSString *input = [self inputString]; 424 | 425 | self.lastCommandStart = self.commandStart; 426 | // Check to see if the command has a length and that it was NOT the last item in the history, and add it 427 | if ([input length] > 0 && ![input isEqualToString:[self.commandHistory topCommand]]) { 428 | [self.commandHistory addCommand:input forRange:NSMakeRange(self.commandStart, [[self string] length] - self.commandStart)]; 429 | } 430 | 431 | [self.commandHistory moveToLast]; 432 | [self moveToEndOfDocument:self]; 433 | [self insertNewlineIgnoringFieldEditor:self]; 434 | // NSString *output = @""; 435 | // if (nil != self.inputHandler) { 436 | // output = self.inputHandler(input); 437 | // } 438 | // [self insertText:output]; 439 | [super insertText:@"\n"]; 440 | if (nil != self.inputHandler) { 441 | self.inputHandler(input, self); 442 | } 443 | 444 | if (self.delayedOutputMode) { 445 | return; // The output will be finished when -endDelayedOutputMode is called 446 | } 447 | 448 | [self finishOutput]; 449 | 450 | } 451 | 452 | 453 | - (NSString *)inputString { 454 | return [[self string] substringFromIndex:self.commandStart]; 455 | } 456 | 457 | 458 | - (void)insertPrompt { 459 | [super insertText:self.prompt]; 460 | } 461 | 462 | 463 | - (void)finishOutput { 464 | [self insertNewlineIgnoringFieldEditor:self]; 465 | [self insertPrompt]; 466 | [self scrollRangeToVisible:[self selectedRange]]; 467 | self.commandStart = [[self string] length]; 468 | self.userEnteredText = NO; 469 | [[self undoManager] removeAllActions]; 470 | 471 | [self highlightText]; 472 | } 473 | 474 | 475 | - (void)highlightText { 476 | // For subclasses to implement 477 | } 478 | 479 | 480 | 481 | @end 482 | -------------------------------------------------------------------------------- /JBShellView/JBShellViewBlockTypedefs.h: -------------------------------------------------------------------------------- 1 | // 2 | // JBShellViewBlockTypedefs.h 3 | // Super Debug 4 | // 5 | // Created by Jason Brennan on 12-07-19. 6 | // Copyright (c) 2012 Jason Brennan. All rights reserved. 7 | // 8 | 9 | #ifndef Super_Debug_JBShellViewBlockTypedefs_h 10 | #define Super_Debug_JBShellViewBlockTypedefs_h 11 | 12 | @class JBShellView; 13 | typedef void (^JBShellViewInputProcessingHandler)(NSString *input, JBShellView *sender); 14 | typedef void (^JBShellViewDragHandler)(id draggedObject); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /JBShellView/en.lproj/Credits.rtf: -------------------------------------------------------------------------------- 1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} 2 | {\colortbl;\red255\green255\blue255;} 3 | \paperw9840\paperh8400 4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural 5 | 6 | \f0\b\fs24 \cf0 Engineering: 7 | \b0 \ 8 | Some people\ 9 | \ 10 | 11 | \b Human Interface Design: 12 | \b0 \ 13 | Some other people\ 14 | \ 15 | 16 | \b Testing: 17 | \b0 \ 18 | Hopefully not nobody\ 19 | \ 20 | 21 | \b Documentation: 22 | \b0 \ 23 | Whoever\ 24 | \ 25 | 26 | \b With special thanks to: 27 | \b0 \ 28 | Mom\ 29 | } 30 | -------------------------------------------------------------------------------- /JBShellView/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /JBShellView/en.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1080 5 | 12C60 6 | 2844 7 | 1187.34 8 | 625.00 9 | 10 | com.apple.InterfaceBuilder.CocoaPlugin 11 | 2844 12 | 13 | 14 | NSCustomObject 15 | NSMenu 16 | NSMenuItem 17 | NSView 18 | NSWindowTemplate 19 | 20 | 21 | com.apple.InterfaceBuilder.CocoaPlugin 22 | 23 | 24 | PluginDependencyRecalculationVersion 25 | 26 | 27 | 28 | 29 | NSApplication 30 | 31 | 32 | FirstResponder 33 | 34 | 35 | NSApplication 36 | 37 | 38 | AMainMenu 39 | 40 | 41 | 42 | JBShellView 43 | 44 | 1048576 45 | 2147483647 46 | 47 | NSImage 48 | NSMenuCheckmark 49 | 50 | 51 | NSImage 52 | NSMenuMixedState 53 | 54 | submenuAction: 55 | 56 | JBShellView 57 | 58 | 59 | 60 | About JBShellView 61 | 62 | 2147483647 63 | 64 | 65 | 66 | 67 | 68 | YES 69 | YES 70 | 71 | 72 | 1048576 73 | 2147483647 74 | 75 | 76 | 77 | 78 | 79 | Preferences… 80 | , 81 | 1048576 82 | 2147483647 83 | 84 | 85 | 86 | 87 | 88 | YES 89 | YES 90 | 91 | 92 | 1048576 93 | 2147483647 94 | 95 | 96 | 97 | 98 | 99 | Services 100 | 101 | 1048576 102 | 2147483647 103 | 104 | 105 | submenuAction: 106 | 107 | Services 108 | 109 | _NSServicesMenu 110 | 111 | 112 | 113 | 114 | YES 115 | YES 116 | 117 | 118 | 1048576 119 | 2147483647 120 | 121 | 122 | 123 | 124 | 125 | Hide JBShellView 126 | h 127 | 1048576 128 | 2147483647 129 | 130 | 131 | 132 | 133 | 134 | Hide Others 135 | h 136 | 1572864 137 | 2147483647 138 | 139 | 140 | 141 | 142 | 143 | Show All 144 | 145 | 1048576 146 | 2147483647 147 | 148 | 149 | 150 | 151 | 152 | YES 153 | YES 154 | 155 | 156 | 1048576 157 | 2147483647 158 | 159 | 160 | 161 | 162 | 163 | Quit JBShellView 164 | q 165 | 1048576 166 | 2147483647 167 | 168 | 169 | 170 | 171 | _NSAppleMenu 172 | 173 | 174 | 175 | 176 | File 177 | 178 | 1048576 179 | 2147483647 180 | 181 | 182 | submenuAction: 183 | 184 | File 185 | 186 | 187 | 188 | New 189 | n 190 | 1048576 191 | 2147483647 192 | 193 | 194 | 195 | 196 | 197 | Open… 198 | o 199 | 1048576 200 | 2147483647 201 | 202 | 203 | 204 | 205 | 206 | Open Recent 207 | 208 | 1048576 209 | 2147483647 210 | 211 | 212 | submenuAction: 213 | 214 | Open Recent 215 | 216 | 217 | 218 | Clear Menu 219 | 220 | 1048576 221 | 2147483647 222 | 223 | 224 | 225 | 226 | _NSRecentDocumentsMenu 227 | 228 | 229 | 230 | 231 | YES 232 | YES 233 | 234 | 235 | 1048576 236 | 2147483647 237 | 238 | 239 | 240 | 241 | 242 | Close 243 | w 244 | 1048576 245 | 2147483647 246 | 247 | 248 | 249 | 250 | 251 | Save… 252 | s 253 | 1048576 254 | 2147483647 255 | 256 | 257 | 258 | 259 | 260 | Revert to Saved 261 | 262 | 2147483647 263 | 264 | 265 | 266 | 267 | 268 | YES 269 | YES 270 | 271 | 272 | 1048576 273 | 2147483647 274 | 275 | 276 | 277 | 278 | 279 | Page Setup... 280 | P 281 | 1179648 282 | 2147483647 283 | 284 | 285 | 286 | 287 | 288 | 289 | Print… 290 | p 291 | 1048576 292 | 2147483647 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | Edit 302 | 303 | 1048576 304 | 2147483647 305 | 306 | 307 | submenuAction: 308 | 309 | Edit 310 | 311 | 312 | 313 | Undo 314 | z 315 | 1048576 316 | 2147483647 317 | 318 | 319 | 320 | 321 | 322 | Redo 323 | Z 324 | 1179648 325 | 2147483647 326 | 327 | 328 | 329 | 330 | 331 | YES 332 | YES 333 | 334 | 335 | 1048576 336 | 2147483647 337 | 338 | 339 | 340 | 341 | 342 | Cut 343 | x 344 | 1048576 345 | 2147483647 346 | 347 | 348 | 349 | 350 | 351 | Copy 352 | c 353 | 1048576 354 | 2147483647 355 | 356 | 357 | 358 | 359 | 360 | Paste 361 | v 362 | 1048576 363 | 2147483647 364 | 365 | 366 | 367 | 368 | 369 | Paste and Match Style 370 | V 371 | 1572864 372 | 2147483647 373 | 374 | 375 | 376 | 377 | 378 | Delete 379 | 380 | 1048576 381 | 2147483647 382 | 383 | 384 | 385 | 386 | 387 | Select All 388 | a 389 | 1048576 390 | 2147483647 391 | 392 | 393 | 394 | 395 | 396 | YES 397 | YES 398 | 399 | 400 | 1048576 401 | 2147483647 402 | 403 | 404 | 405 | 406 | 407 | Find 408 | 409 | 1048576 410 | 2147483647 411 | 412 | 413 | submenuAction: 414 | 415 | Find 416 | 417 | 418 | 419 | Find… 420 | f 421 | 1048576 422 | 2147483647 423 | 424 | 425 | 1 426 | 427 | 428 | 429 | Find and Replace… 430 | f 431 | 1572864 432 | 2147483647 433 | 434 | 435 | 12 436 | 437 | 438 | 439 | Find Next 440 | g 441 | 1048576 442 | 2147483647 443 | 444 | 445 | 2 446 | 447 | 448 | 449 | Find Previous 450 | G 451 | 1179648 452 | 2147483647 453 | 454 | 455 | 3 456 | 457 | 458 | 459 | Use Selection for Find 460 | e 461 | 1048576 462 | 2147483647 463 | 464 | 465 | 7 466 | 467 | 468 | 469 | Jump to Selection 470 | j 471 | 1048576 472 | 2147483647 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | Spelling and Grammar 482 | 483 | 1048576 484 | 2147483647 485 | 486 | 487 | submenuAction: 488 | 489 | Spelling and Grammar 490 | 491 | 492 | 493 | Show Spelling and Grammar 494 | : 495 | 1048576 496 | 2147483647 497 | 498 | 499 | 500 | 501 | 502 | Check Document Now 503 | ; 504 | 1048576 505 | 2147483647 506 | 507 | 508 | 509 | 510 | 511 | YES 512 | YES 513 | 514 | 515 | 2147483647 516 | 517 | 518 | 519 | 520 | 521 | Check Spelling While Typing 522 | 523 | 1048576 524 | 2147483647 525 | 526 | 527 | 528 | 529 | 530 | Check Grammar With Spelling 531 | 532 | 1048576 533 | 2147483647 534 | 535 | 536 | 537 | 538 | 539 | Correct Spelling Automatically 540 | 541 | 2147483647 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | Substitutions 551 | 552 | 1048576 553 | 2147483647 554 | 555 | 556 | submenuAction: 557 | 558 | Substitutions 559 | 560 | 561 | 562 | Show Substitutions 563 | 564 | 2147483647 565 | 566 | 567 | 568 | 569 | 570 | YES 571 | YES 572 | 573 | 574 | 2147483647 575 | 576 | 577 | 578 | 579 | 580 | Smart Copy/Paste 581 | f 582 | 1048576 583 | 2147483647 584 | 585 | 586 | 1 587 | 588 | 589 | 590 | Smart Quotes 591 | g 592 | 1048576 593 | 2147483647 594 | 595 | 596 | 2 597 | 598 | 599 | 600 | Smart Dashes 601 | 602 | 2147483647 603 | 604 | 605 | 606 | 607 | 608 | Smart Links 609 | G 610 | 1179648 611 | 2147483647 612 | 613 | 614 | 3 615 | 616 | 617 | 618 | Text Replacement 619 | 620 | 2147483647 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | Transformations 630 | 631 | 2147483647 632 | 633 | 634 | submenuAction: 635 | 636 | Transformations 637 | 638 | 639 | 640 | Make Upper Case 641 | 642 | 2147483647 643 | 644 | 645 | 646 | 647 | 648 | Make Lower Case 649 | 650 | 2147483647 651 | 652 | 653 | 654 | 655 | 656 | Capitalize 657 | 658 | 2147483647 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | Speech 668 | 669 | 1048576 670 | 2147483647 671 | 672 | 673 | submenuAction: 674 | 675 | Speech 676 | 677 | 678 | 679 | Start Speaking 680 | 681 | 1048576 682 | 2147483647 683 | 684 | 685 | 686 | 687 | 688 | Stop Speaking 689 | 690 | 1048576 691 | 2147483647 692 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | Format 704 | 705 | 2147483647 706 | 707 | 708 | submenuAction: 709 | 710 | Format 711 | 712 | 713 | 714 | Font 715 | 716 | 2147483647 717 | 718 | 719 | submenuAction: 720 | 721 | Font 722 | 723 | 724 | 725 | Show Fonts 726 | t 727 | 1048576 728 | 2147483647 729 | 730 | 731 | 732 | 733 | 734 | Bold 735 | b 736 | 1048576 737 | 2147483647 738 | 739 | 740 | 2 741 | 742 | 743 | 744 | Italic 745 | i 746 | 1048576 747 | 2147483647 748 | 749 | 750 | 1 751 | 752 | 753 | 754 | Underline 755 | u 756 | 1048576 757 | 2147483647 758 | 759 | 760 | 761 | 762 | 763 | YES 764 | YES 765 | 766 | 767 | 2147483647 768 | 769 | 770 | 771 | 772 | 773 | Bigger 774 | + 775 | 1048576 776 | 2147483647 777 | 778 | 779 | 3 780 | 781 | 782 | 783 | Smaller 784 | - 785 | 1048576 786 | 2147483647 787 | 788 | 789 | 4 790 | 791 | 792 | 793 | YES 794 | YES 795 | 796 | 797 | 2147483647 798 | 799 | 800 | 801 | 802 | 803 | Kern 804 | 805 | 2147483647 806 | 807 | 808 | submenuAction: 809 | 810 | Kern 811 | 812 | 813 | 814 | Use Default 815 | 816 | 2147483647 817 | 818 | 819 | 820 | 821 | 822 | Use None 823 | 824 | 2147483647 825 | 826 | 827 | 828 | 829 | 830 | Tighten 831 | 832 | 2147483647 833 | 834 | 835 | 836 | 837 | 838 | Loosen 839 | 840 | 2147483647 841 | 842 | 843 | 844 | 845 | 846 | 847 | 848 | 849 | Ligatures 850 | 851 | 2147483647 852 | 853 | 854 | submenuAction: 855 | 856 | Ligatures 857 | 858 | 859 | 860 | Use Default 861 | 862 | 2147483647 863 | 864 | 865 | 866 | 867 | 868 | Use None 869 | 870 | 2147483647 871 | 872 | 873 | 874 | 875 | 876 | Use All 877 | 878 | 2147483647 879 | 880 | 881 | 882 | 883 | 884 | 885 | 886 | 887 | Baseline 888 | 889 | 2147483647 890 | 891 | 892 | submenuAction: 893 | 894 | Baseline 895 | 896 | 897 | 898 | Use Default 899 | 900 | 2147483647 901 | 902 | 903 | 904 | 905 | 906 | Superscript 907 | 908 | 2147483647 909 | 910 | 911 | 912 | 913 | 914 | Subscript 915 | 916 | 2147483647 917 | 918 | 919 | 920 | 921 | 922 | Raise 923 | 924 | 2147483647 925 | 926 | 927 | 928 | 929 | 930 | Lower 931 | 932 | 2147483647 933 | 934 | 935 | 936 | 937 | 938 | 939 | 940 | 941 | YES 942 | YES 943 | 944 | 945 | 2147483647 946 | 947 | 948 | 949 | 950 | 951 | Show Colors 952 | C 953 | 1048576 954 | 2147483647 955 | 956 | 957 | 958 | 959 | 960 | YES 961 | YES 962 | 963 | 964 | 2147483647 965 | 966 | 967 | 968 | 969 | 970 | Copy Style 971 | c 972 | 1572864 973 | 2147483647 974 | 975 | 976 | 977 | 978 | 979 | Paste Style 980 | v 981 | 1572864 982 | 2147483647 983 | 984 | 985 | 986 | 987 | _NSFontMenu 988 | 989 | 990 | 991 | 992 | Text 993 | 994 | 2147483647 995 | 996 | 997 | submenuAction: 998 | 999 | Text 1000 | 1001 | 1002 | 1003 | Align Left 1004 | { 1005 | 1048576 1006 | 2147483647 1007 | 1008 | 1009 | 1010 | 1011 | 1012 | Center 1013 | | 1014 | 1048576 1015 | 2147483647 1016 | 1017 | 1018 | 1019 | 1020 | 1021 | Justify 1022 | 1023 | 2147483647 1024 | 1025 | 1026 | 1027 | 1028 | 1029 | Align Right 1030 | } 1031 | 1048576 1032 | 2147483647 1033 | 1034 | 1035 | 1036 | 1037 | 1038 | YES 1039 | YES 1040 | 1041 | 1042 | 2147483647 1043 | 1044 | 1045 | 1046 | 1047 | 1048 | Writing Direction 1049 | 1050 | 2147483647 1051 | 1052 | 1053 | submenuAction: 1054 | 1055 | Writing Direction 1056 | 1057 | 1058 | 1059 | YES 1060 | Paragraph 1061 | 1062 | 2147483647 1063 | 1064 | 1065 | 1066 | 1067 | 1068 | CURlZmF1bHQ 1069 | 1070 | 2147483647 1071 | 1072 | 1073 | 1074 | 1075 | 1076 | CUxlZnQgdG8gUmlnaHQ 1077 | 1078 | 2147483647 1079 | 1080 | 1081 | 1082 | 1083 | 1084 | CVJpZ2h0IHRvIExlZnQ 1085 | 1086 | 2147483647 1087 | 1088 | 1089 | 1090 | 1091 | 1092 | YES 1093 | YES 1094 | 1095 | 1096 | 2147483647 1097 | 1098 | 1099 | 1100 | 1101 | 1102 | YES 1103 | Selection 1104 | 1105 | 2147483647 1106 | 1107 | 1108 | 1109 | 1110 | 1111 | CURlZmF1bHQ 1112 | 1113 | 2147483647 1114 | 1115 | 1116 | 1117 | 1118 | 1119 | CUxlZnQgdG8gUmlnaHQ 1120 | 1121 | 2147483647 1122 | 1123 | 1124 | 1125 | 1126 | 1127 | CVJpZ2h0IHRvIExlZnQ 1128 | 1129 | 2147483647 1130 | 1131 | 1132 | 1133 | 1134 | 1135 | 1136 | 1137 | 1138 | YES 1139 | YES 1140 | 1141 | 1142 | 2147483647 1143 | 1144 | 1145 | 1146 | 1147 | 1148 | Show Ruler 1149 | 1150 | 2147483647 1151 | 1152 | 1153 | 1154 | 1155 | 1156 | Copy Ruler 1157 | c 1158 | 1310720 1159 | 2147483647 1160 | 1161 | 1162 | 1163 | 1164 | 1165 | Paste Ruler 1166 | v 1167 | 1310720 1168 | 2147483647 1169 | 1170 | 1171 | 1172 | 1173 | 1174 | 1175 | 1176 | 1177 | 1178 | 1179 | 1180 | View 1181 | 1182 | 1048576 1183 | 2147483647 1184 | 1185 | 1186 | submenuAction: 1187 | 1188 | View 1189 | 1190 | 1191 | 1192 | Show Toolbar 1193 | t 1194 | 1572864 1195 | 2147483647 1196 | 1197 | 1198 | 1199 | 1200 | 1201 | Customize Toolbar… 1202 | 1203 | 1048576 1204 | 2147483647 1205 | 1206 | 1207 | 1208 | 1209 | 1210 | 1211 | 1212 | 1213 | Window 1214 | 1215 | 1048576 1216 | 2147483647 1217 | 1218 | 1219 | submenuAction: 1220 | 1221 | Window 1222 | 1223 | 1224 | 1225 | Minimize 1226 | m 1227 | 1048576 1228 | 2147483647 1229 | 1230 | 1231 | 1232 | 1233 | 1234 | Zoom 1235 | 1236 | 1048576 1237 | 2147483647 1238 | 1239 | 1240 | 1241 | 1242 | 1243 | YES 1244 | YES 1245 | 1246 | 1247 | 1048576 1248 | 2147483647 1249 | 1250 | 1251 | 1252 | 1253 | 1254 | Bring All to Front 1255 | 1256 | 1048576 1257 | 2147483647 1258 | 1259 | 1260 | 1261 | 1262 | _NSWindowsMenu 1263 | 1264 | 1265 | 1266 | 1267 | Help 1268 | 1269 | 2147483647 1270 | 1271 | 1272 | submenuAction: 1273 | 1274 | Help 1275 | 1276 | 1277 | 1278 | JBShellView Help 1279 | ? 1280 | 1048576 1281 | 2147483647 1282 | 1283 | 1284 | 1285 | 1286 | _NSHelpMenu 1287 | 1288 | 1289 | 1290 | _NSMainMenu 1291 | 1292 | 1293 | 15 1294 | 2 1295 | {{335, 390}, {600, 360}} 1296 | 1954021376 1297 | JBShellView 1298 | NSWindow 1299 | 1300 | 1301 | 1302 | 1303 | 256 1304 | {600, 360} 1305 | 1306 | 1307 | 1308 | {{0, 0}, {1440, 878}} 1309 | {10000000000000, 10000000000000} 1310 | YES 1311 | 1312 | 1313 | JBAppDelegate 1314 | 1315 | 1316 | NSFontManager 1317 | 1318 | 1319 | 1320 | 1321 | 1322 | 1323 | terminate: 1324 | 1325 | 1326 | 1327 | 449 1328 | 1329 | 1330 | 1331 | orderFrontStandardAboutPanel: 1332 | 1333 | 1334 | 1335 | 142 1336 | 1337 | 1338 | 1339 | delegate 1340 | 1341 | 1342 | 1343 | 495 1344 | 1345 | 1346 | 1347 | performMiniaturize: 1348 | 1349 | 1350 | 1351 | 37 1352 | 1353 | 1354 | 1355 | arrangeInFront: 1356 | 1357 | 1358 | 1359 | 39 1360 | 1361 | 1362 | 1363 | print: 1364 | 1365 | 1366 | 1367 | 86 1368 | 1369 | 1370 | 1371 | runPageLayout: 1372 | 1373 | 1374 | 1375 | 87 1376 | 1377 | 1378 | 1379 | clearRecentDocuments: 1380 | 1381 | 1382 | 1383 | 127 1384 | 1385 | 1386 | 1387 | performClose: 1388 | 1389 | 1390 | 1391 | 193 1392 | 1393 | 1394 | 1395 | toggleContinuousSpellChecking: 1396 | 1397 | 1398 | 1399 | 222 1400 | 1401 | 1402 | 1403 | undo: 1404 | 1405 | 1406 | 1407 | 223 1408 | 1409 | 1410 | 1411 | copy: 1412 | 1413 | 1414 | 1415 | 224 1416 | 1417 | 1418 | 1419 | checkSpelling: 1420 | 1421 | 1422 | 1423 | 225 1424 | 1425 | 1426 | 1427 | paste: 1428 | 1429 | 1430 | 1431 | 226 1432 | 1433 | 1434 | 1435 | stopSpeaking: 1436 | 1437 | 1438 | 1439 | 227 1440 | 1441 | 1442 | 1443 | cut: 1444 | 1445 | 1446 | 1447 | 228 1448 | 1449 | 1450 | 1451 | showGuessPanel: 1452 | 1453 | 1454 | 1455 | 230 1456 | 1457 | 1458 | 1459 | redo: 1460 | 1461 | 1462 | 1463 | 231 1464 | 1465 | 1466 | 1467 | selectAll: 1468 | 1469 | 1470 | 1471 | 232 1472 | 1473 | 1474 | 1475 | startSpeaking: 1476 | 1477 | 1478 | 1479 | 233 1480 | 1481 | 1482 | 1483 | delete: 1484 | 1485 | 1486 | 1487 | 235 1488 | 1489 | 1490 | 1491 | performZoom: 1492 | 1493 | 1494 | 1495 | 240 1496 | 1497 | 1498 | 1499 | performFindPanelAction: 1500 | 1501 | 1502 | 1503 | 241 1504 | 1505 | 1506 | 1507 | centerSelectionInVisibleArea: 1508 | 1509 | 1510 | 1511 | 245 1512 | 1513 | 1514 | 1515 | toggleGrammarChecking: 1516 | 1517 | 1518 | 1519 | 347 1520 | 1521 | 1522 | 1523 | toggleSmartInsertDelete: 1524 | 1525 | 1526 | 1527 | 355 1528 | 1529 | 1530 | 1531 | toggleAutomaticQuoteSubstitution: 1532 | 1533 | 1534 | 1535 | 356 1536 | 1537 | 1538 | 1539 | toggleAutomaticLinkDetection: 1540 | 1541 | 1542 | 1543 | 357 1544 | 1545 | 1546 | 1547 | saveDocument: 1548 | 1549 | 1550 | 1551 | 362 1552 | 1553 | 1554 | 1555 | revertDocumentToSaved: 1556 | 1557 | 1558 | 1559 | 364 1560 | 1561 | 1562 | 1563 | runToolbarCustomizationPalette: 1564 | 1565 | 1566 | 1567 | 365 1568 | 1569 | 1570 | 1571 | toggleToolbarShown: 1572 | 1573 | 1574 | 1575 | 366 1576 | 1577 | 1578 | 1579 | hide: 1580 | 1581 | 1582 | 1583 | 367 1584 | 1585 | 1586 | 1587 | hideOtherApplications: 1588 | 1589 | 1590 | 1591 | 368 1592 | 1593 | 1594 | 1595 | unhideAllApplications: 1596 | 1597 | 1598 | 1599 | 370 1600 | 1601 | 1602 | 1603 | newDocument: 1604 | 1605 | 1606 | 1607 | 373 1608 | 1609 | 1610 | 1611 | openDocument: 1612 | 1613 | 1614 | 1615 | 374 1616 | 1617 | 1618 | 1619 | raiseBaseline: 1620 | 1621 | 1622 | 1623 | 426 1624 | 1625 | 1626 | 1627 | lowerBaseline: 1628 | 1629 | 1630 | 1631 | 427 1632 | 1633 | 1634 | 1635 | copyFont: 1636 | 1637 | 1638 | 1639 | 428 1640 | 1641 | 1642 | 1643 | subscript: 1644 | 1645 | 1646 | 1647 | 429 1648 | 1649 | 1650 | 1651 | superscript: 1652 | 1653 | 1654 | 1655 | 430 1656 | 1657 | 1658 | 1659 | tightenKerning: 1660 | 1661 | 1662 | 1663 | 431 1664 | 1665 | 1666 | 1667 | underline: 1668 | 1669 | 1670 | 1671 | 432 1672 | 1673 | 1674 | 1675 | orderFrontColorPanel: 1676 | 1677 | 1678 | 1679 | 433 1680 | 1681 | 1682 | 1683 | useAllLigatures: 1684 | 1685 | 1686 | 1687 | 434 1688 | 1689 | 1690 | 1691 | loosenKerning: 1692 | 1693 | 1694 | 1695 | 435 1696 | 1697 | 1698 | 1699 | pasteFont: 1700 | 1701 | 1702 | 1703 | 436 1704 | 1705 | 1706 | 1707 | unscript: 1708 | 1709 | 1710 | 1711 | 437 1712 | 1713 | 1714 | 1715 | useStandardKerning: 1716 | 1717 | 1718 | 1719 | 438 1720 | 1721 | 1722 | 1723 | useStandardLigatures: 1724 | 1725 | 1726 | 1727 | 439 1728 | 1729 | 1730 | 1731 | turnOffLigatures: 1732 | 1733 | 1734 | 1735 | 440 1736 | 1737 | 1738 | 1739 | turnOffKerning: 1740 | 1741 | 1742 | 1743 | 441 1744 | 1745 | 1746 | 1747 | toggleAutomaticSpellingCorrection: 1748 | 1749 | 1750 | 1751 | 456 1752 | 1753 | 1754 | 1755 | orderFrontSubstitutionsPanel: 1756 | 1757 | 1758 | 1759 | 458 1760 | 1761 | 1762 | 1763 | toggleAutomaticDashSubstitution: 1764 | 1765 | 1766 | 1767 | 461 1768 | 1769 | 1770 | 1771 | toggleAutomaticTextReplacement: 1772 | 1773 | 1774 | 1775 | 463 1776 | 1777 | 1778 | 1779 | uppercaseWord: 1780 | 1781 | 1782 | 1783 | 464 1784 | 1785 | 1786 | 1787 | capitalizeWord: 1788 | 1789 | 1790 | 1791 | 467 1792 | 1793 | 1794 | 1795 | lowercaseWord: 1796 | 1797 | 1798 | 1799 | 468 1800 | 1801 | 1802 | 1803 | pasteAsPlainText: 1804 | 1805 | 1806 | 1807 | 486 1808 | 1809 | 1810 | 1811 | performFindPanelAction: 1812 | 1813 | 1814 | 1815 | 487 1816 | 1817 | 1818 | 1819 | performFindPanelAction: 1820 | 1821 | 1822 | 1823 | 488 1824 | 1825 | 1826 | 1827 | performFindPanelAction: 1828 | 1829 | 1830 | 1831 | 489 1832 | 1833 | 1834 | 1835 | showHelp: 1836 | 1837 | 1838 | 1839 | 493 1840 | 1841 | 1842 | 1843 | alignCenter: 1844 | 1845 | 1846 | 1847 | 518 1848 | 1849 | 1850 | 1851 | pasteRuler: 1852 | 1853 | 1854 | 1855 | 519 1856 | 1857 | 1858 | 1859 | toggleRuler: 1860 | 1861 | 1862 | 1863 | 520 1864 | 1865 | 1866 | 1867 | alignRight: 1868 | 1869 | 1870 | 1871 | 521 1872 | 1873 | 1874 | 1875 | copyRuler: 1876 | 1877 | 1878 | 1879 | 522 1880 | 1881 | 1882 | 1883 | alignJustified: 1884 | 1885 | 1886 | 1887 | 523 1888 | 1889 | 1890 | 1891 | alignLeft: 1892 | 1893 | 1894 | 1895 | 524 1896 | 1897 | 1898 | 1899 | makeBaseWritingDirectionNatural: 1900 | 1901 | 1902 | 1903 | 525 1904 | 1905 | 1906 | 1907 | makeBaseWritingDirectionLeftToRight: 1908 | 1909 | 1910 | 1911 | 526 1912 | 1913 | 1914 | 1915 | makeBaseWritingDirectionRightToLeft: 1916 | 1917 | 1918 | 1919 | 527 1920 | 1921 | 1922 | 1923 | makeTextWritingDirectionNatural: 1924 | 1925 | 1926 | 1927 | 528 1928 | 1929 | 1930 | 1931 | makeTextWritingDirectionLeftToRight: 1932 | 1933 | 1934 | 1935 | 529 1936 | 1937 | 1938 | 1939 | makeTextWritingDirectionRightToLeft: 1940 | 1941 | 1942 | 1943 | 530 1944 | 1945 | 1946 | 1947 | performFindPanelAction: 1948 | 1949 | 1950 | 1951 | 535 1952 | 1953 | 1954 | 1955 | addFontTrait: 1956 | 1957 | 1958 | 1959 | 421 1960 | 1961 | 1962 | 1963 | addFontTrait: 1964 | 1965 | 1966 | 1967 | 422 1968 | 1969 | 1970 | 1971 | modifyFont: 1972 | 1973 | 1974 | 1975 | 423 1976 | 1977 | 1978 | 1979 | orderFrontFontPanel: 1980 | 1981 | 1982 | 1983 | 424 1984 | 1985 | 1986 | 1987 | modifyFont: 1988 | 1989 | 1990 | 1991 | 425 1992 | 1993 | 1994 | 1995 | window 1996 | 1997 | 1998 | 1999 | 532 2000 | 2001 | 2002 | 2003 | 2004 | 2005 | 0 2006 | 2007 | 2008 | 2009 | 2010 | 2011 | -2 2012 | 2013 | 2014 | File's Owner 2015 | 2016 | 2017 | -1 2018 | 2019 | 2020 | First Responder 2021 | 2022 | 2023 | -3 2024 | 2025 | 2026 | Application 2027 | 2028 | 2029 | 29 2030 | 2031 | 2032 | 2033 | 2034 | 2035 | 2036 | 2037 | 2038 | 2039 | 2040 | 2041 | 2042 | 2043 | 19 2044 | 2045 | 2046 | 2047 | 2048 | 2049 | 2050 | 2051 | 56 2052 | 2053 | 2054 | 2055 | 2056 | 2057 | 2058 | 2059 | 217 2060 | 2061 | 2062 | 2063 | 2064 | 2065 | 2066 | 2067 | 83 2068 | 2069 | 2070 | 2071 | 2072 | 2073 | 2074 | 2075 | 81 2076 | 2077 | 2078 | 2079 | 2080 | 2081 | 2082 | 2083 | 2084 | 2085 | 2086 | 2087 | 2088 | 2089 | 2090 | 2091 | 2092 | 75 2093 | 2094 | 2095 | 2096 | 2097 | 78 2098 | 2099 | 2100 | 2101 | 2102 | 72 2103 | 2104 | 2105 | 2106 | 2107 | 82 2108 | 2109 | 2110 | 2111 | 2112 | 124 2113 | 2114 | 2115 | 2116 | 2117 | 2118 | 2119 | 2120 | 77 2121 | 2122 | 2123 | 2124 | 2125 | 73 2126 | 2127 | 2128 | 2129 | 2130 | 79 2131 | 2132 | 2133 | 2134 | 2135 | 112 2136 | 2137 | 2138 | 2139 | 2140 | 74 2141 | 2142 | 2143 | 2144 | 2145 | 125 2146 | 2147 | 2148 | 2149 | 2150 | 2151 | 2152 | 2153 | 126 2154 | 2155 | 2156 | 2157 | 2158 | 205 2159 | 2160 | 2161 | 2162 | 2163 | 2164 | 2165 | 2166 | 2167 | 2168 | 2169 | 2170 | 2171 | 2172 | 2173 | 2174 | 2175 | 2176 | 2177 | 2178 | 2179 | 2180 | 202 2181 | 2182 | 2183 | 2184 | 2185 | 198 2186 | 2187 | 2188 | 2189 | 2190 | 207 2191 | 2192 | 2193 | 2194 | 2195 | 214 2196 | 2197 | 2198 | 2199 | 2200 | 199 2201 | 2202 | 2203 | 2204 | 2205 | 203 2206 | 2207 | 2208 | 2209 | 2210 | 197 2211 | 2212 | 2213 | 2214 | 2215 | 206 2216 | 2217 | 2218 | 2219 | 2220 | 215 2221 | 2222 | 2223 | 2224 | 2225 | 218 2226 | 2227 | 2228 | 2229 | 2230 | 2231 | 2232 | 2233 | 216 2234 | 2235 | 2236 | 2237 | 2238 | 2239 | 2240 | 2241 | 200 2242 | 2243 | 2244 | 2245 | 2246 | 2247 | 2248 | 2249 | 2250 | 2251 | 2252 | 2253 | 2254 | 219 2255 | 2256 | 2257 | 2258 | 2259 | 201 2260 | 2261 | 2262 | 2263 | 2264 | 204 2265 | 2266 | 2267 | 2268 | 2269 | 220 2270 | 2271 | 2272 | 2273 | 2274 | 2275 | 2276 | 2277 | 2278 | 2279 | 2280 | 2281 | 2282 | 213 2283 | 2284 | 2285 | 2286 | 2287 | 210 2288 | 2289 | 2290 | 2291 | 2292 | 221 2293 | 2294 | 2295 | 2296 | 2297 | 208 2298 | 2299 | 2300 | 2301 | 2302 | 209 2303 | 2304 | 2305 | 2306 | 2307 | 57 2308 | 2309 | 2310 | 2311 | 2312 | 2313 | 2314 | 2315 | 2316 | 2317 | 2318 | 2319 | 2320 | 2321 | 2322 | 2323 | 2324 | 2325 | 58 2326 | 2327 | 2328 | 2329 | 2330 | 134 2331 | 2332 | 2333 | 2334 | 2335 | 150 2336 | 2337 | 2338 | 2339 | 2340 | 136 2341 | 2342 | 2343 | 2344 | 2345 | 144 2346 | 2347 | 2348 | 2349 | 2350 | 129 2351 | 2352 | 2353 | 2354 | 2355 | 143 2356 | 2357 | 2358 | 2359 | 2360 | 236 2361 | 2362 | 2363 | 2364 | 2365 | 131 2366 | 2367 | 2368 | 2369 | 2370 | 2371 | 2372 | 2373 | 149 2374 | 2375 | 2376 | 2377 | 2378 | 145 2379 | 2380 | 2381 | 2382 | 2383 | 130 2384 | 2385 | 2386 | 2387 | 2388 | 24 2389 | 2390 | 2391 | 2392 | 2393 | 2394 | 2395 | 2396 | 2397 | 2398 | 2399 | 92 2400 | 2401 | 2402 | 2403 | 2404 | 5 2405 | 2406 | 2407 | 2408 | 2409 | 239 2410 | 2411 | 2412 | 2413 | 2414 | 23 2415 | 2416 | 2417 | 2418 | 2419 | 295 2420 | 2421 | 2422 | 2423 | 2424 | 2425 | 2426 | 2427 | 296 2428 | 2429 | 2430 | 2431 | 2432 | 2433 | 2434 | 2435 | 2436 | 297 2437 | 2438 | 2439 | 2440 | 2441 | 298 2442 | 2443 | 2444 | 2445 | 2446 | 211 2447 | 2448 | 2449 | 2450 | 2451 | 2452 | 2453 | 2454 | 212 2455 | 2456 | 2457 | 2458 | 2459 | 2460 | 2461 | 2462 | 2463 | 195 2464 | 2465 | 2466 | 2467 | 2468 | 196 2469 | 2470 | 2471 | 2472 | 2473 | 346 2474 | 2475 | 2476 | 2477 | 2478 | 348 2479 | 2480 | 2481 | 2482 | 2483 | 2484 | 2485 | 2486 | 349 2487 | 2488 | 2489 | 2490 | 2491 | 2492 | 2493 | 2494 | 2495 | 2496 | 2497 | 2498 | 2499 | 2500 | 350 2501 | 2502 | 2503 | 2504 | 2505 | 351 2506 | 2507 | 2508 | 2509 | 2510 | 354 2511 | 2512 | 2513 | 2514 | 2515 | 371 2516 | 2517 | 2518 | 2519 | 2520 | 2521 | 2522 | 2523 | 372 2524 | 2525 | 2526 | 2527 | 2528 | 375 2529 | 2530 | 2531 | 2532 | 2533 | 2534 | 2535 | 2536 | 376 2537 | 2538 | 2539 | 2540 | 2541 | 2542 | 2543 | 2544 | 2545 | 377 2546 | 2547 | 2548 | 2549 | 2550 | 2551 | 2552 | 2553 | 388 2554 | 2555 | 2556 | 2557 | 2558 | 2559 | 2560 | 2561 | 2562 | 2563 | 2564 | 2565 | 2566 | 2567 | 2568 | 2569 | 2570 | 2571 | 2572 | 2573 | 2574 | 2575 | 2576 | 389 2577 | 2578 | 2579 | 2580 | 2581 | 390 2582 | 2583 | 2584 | 2585 | 2586 | 391 2587 | 2588 | 2589 | 2590 | 2591 | 392 2592 | 2593 | 2594 | 2595 | 2596 | 393 2597 | 2598 | 2599 | 2600 | 2601 | 394 2602 | 2603 | 2604 | 2605 | 2606 | 395 2607 | 2608 | 2609 | 2610 | 2611 | 396 2612 | 2613 | 2614 | 2615 | 2616 | 397 2617 | 2618 | 2619 | 2620 | 2621 | 2622 | 2623 | 2624 | 398 2625 | 2626 | 2627 | 2628 | 2629 | 2630 | 2631 | 2632 | 399 2633 | 2634 | 2635 | 2636 | 2637 | 2638 | 2639 | 2640 | 400 2641 | 2642 | 2643 | 2644 | 2645 | 401 2646 | 2647 | 2648 | 2649 | 2650 | 402 2651 | 2652 | 2653 | 2654 | 2655 | 403 2656 | 2657 | 2658 | 2659 | 2660 | 404 2661 | 2662 | 2663 | 2664 | 2665 | 405 2666 | 2667 | 2668 | 2669 | 2670 | 2671 | 2672 | 2673 | 2674 | 2675 | 2676 | 2677 | 406 2678 | 2679 | 2680 | 2681 | 2682 | 407 2683 | 2684 | 2685 | 2686 | 2687 | 408 2688 | 2689 | 2690 | 2691 | 2692 | 409 2693 | 2694 | 2695 | 2696 | 2697 | 410 2698 | 2699 | 2700 | 2701 | 2702 | 411 2703 | 2704 | 2705 | 2706 | 2707 | 2708 | 2709 | 2710 | 2711 | 2712 | 412 2713 | 2714 | 2715 | 2716 | 2717 | 413 2718 | 2719 | 2720 | 2721 | 2722 | 414 2723 | 2724 | 2725 | 2726 | 2727 | 415 2728 | 2729 | 2730 | 2731 | 2732 | 2733 | 2734 | 2735 | 2736 | 2737 | 2738 | 416 2739 | 2740 | 2741 | 2742 | 2743 | 417 2744 | 2745 | 2746 | 2747 | 2748 | 418 2749 | 2750 | 2751 | 2752 | 2753 | 419 2754 | 2755 | 2756 | 2757 | 2758 | 420 2759 | 2760 | 2761 | 2762 | 2763 | 450 2764 | 2765 | 2766 | 2767 | 2768 | 2769 | 2770 | 2771 | 451 2772 | 2773 | 2774 | 2775 | 2776 | 2777 | 2778 | 2779 | 2780 | 2781 | 452 2782 | 2783 | 2784 | 2785 | 2786 | 453 2787 | 2788 | 2789 | 2790 | 2791 | 454 2792 | 2793 | 2794 | 2795 | 2796 | 457 2797 | 2798 | 2799 | 2800 | 2801 | 459 2802 | 2803 | 2804 | 2805 | 2806 | 460 2807 | 2808 | 2809 | 2810 | 2811 | 462 2812 | 2813 | 2814 | 2815 | 2816 | 465 2817 | 2818 | 2819 | 2820 | 2821 | 466 2822 | 2823 | 2824 | 2825 | 2826 | 485 2827 | 2828 | 2829 | 2830 | 2831 | 490 2832 | 2833 | 2834 | 2835 | 2836 | 2837 | 2838 | 2839 | 491 2840 | 2841 | 2842 | 2843 | 2844 | 2845 | 2846 | 2847 | 492 2848 | 2849 | 2850 | 2851 | 2852 | 494 2853 | 2854 | 2855 | 2856 | 2857 | 496 2858 | 2859 | 2860 | 2861 | 2862 | 2863 | 2864 | 2865 | 497 2866 | 2867 | 2868 | 2869 | 2870 | 2871 | 2872 | 2873 | 2874 | 2875 | 2876 | 2877 | 2878 | 2879 | 2880 | 2881 | 2882 | 498 2883 | 2884 | 2885 | 2886 | 2887 | 499 2888 | 2889 | 2890 | 2891 | 2892 | 500 2893 | 2894 | 2895 | 2896 | 2897 | 501 2898 | 2899 | 2900 | 2901 | 2902 | 502 2903 | 2904 | 2905 | 2906 | 2907 | 503 2908 | 2909 | 2910 | 2911 | 2912 | 2913 | 2914 | 2915 | 504 2916 | 2917 | 2918 | 2919 | 2920 | 505 2921 | 2922 | 2923 | 2924 | 2925 | 506 2926 | 2927 | 2928 | 2929 | 2930 | 507 2931 | 2932 | 2933 | 2934 | 2935 | 508 2936 | 2937 | 2938 | 2939 | 2940 | 2941 | 2942 | 2943 | 2944 | 2945 | 2946 | 2947 | 2948 | 2949 | 2950 | 2951 | 509 2952 | 2953 | 2954 | 2955 | 2956 | 510 2957 | 2958 | 2959 | 2960 | 2961 | 511 2962 | 2963 | 2964 | 2965 | 2966 | 512 2967 | 2968 | 2969 | 2970 | 2971 | 513 2972 | 2973 | 2974 | 2975 | 2976 | 514 2977 | 2978 | 2979 | 2980 | 2981 | 515 2982 | 2983 | 2984 | 2985 | 2986 | 516 2987 | 2988 | 2989 | 2990 | 2991 | 517 2992 | 2993 | 2994 | 2995 | 2996 | 534 2997 | 2998 | 2999 | 3000 | 3001 | 3002 | 3003 | com.apple.InterfaceBuilder.CocoaPlugin 3004 | com.apple.InterfaceBuilder.CocoaPlugin 3005 | com.apple.InterfaceBuilder.CocoaPlugin 3006 | com.apple.InterfaceBuilder.CocoaPlugin 3007 | com.apple.InterfaceBuilder.CocoaPlugin 3008 | com.apple.InterfaceBuilder.CocoaPlugin 3009 | com.apple.InterfaceBuilder.CocoaPlugin 3010 | com.apple.InterfaceBuilder.CocoaPlugin 3011 | com.apple.InterfaceBuilder.CocoaPlugin 3012 | com.apple.InterfaceBuilder.CocoaPlugin 3013 | com.apple.InterfaceBuilder.CocoaPlugin 3014 | com.apple.InterfaceBuilder.CocoaPlugin 3015 | com.apple.InterfaceBuilder.CocoaPlugin 3016 | com.apple.InterfaceBuilder.CocoaPlugin 3017 | com.apple.InterfaceBuilder.CocoaPlugin 3018 | com.apple.InterfaceBuilder.CocoaPlugin 3019 | com.apple.InterfaceBuilder.CocoaPlugin 3020 | com.apple.InterfaceBuilder.CocoaPlugin 3021 | com.apple.InterfaceBuilder.CocoaPlugin 3022 | com.apple.InterfaceBuilder.CocoaPlugin 3023 | com.apple.InterfaceBuilder.CocoaPlugin 3024 | com.apple.InterfaceBuilder.CocoaPlugin 3025 | com.apple.InterfaceBuilder.CocoaPlugin 3026 | com.apple.InterfaceBuilder.CocoaPlugin 3027 | com.apple.InterfaceBuilder.CocoaPlugin 3028 | com.apple.InterfaceBuilder.CocoaPlugin 3029 | com.apple.InterfaceBuilder.CocoaPlugin 3030 | com.apple.InterfaceBuilder.CocoaPlugin 3031 | com.apple.InterfaceBuilder.CocoaPlugin 3032 | com.apple.InterfaceBuilder.CocoaPlugin 3033 | com.apple.InterfaceBuilder.CocoaPlugin 3034 | com.apple.InterfaceBuilder.CocoaPlugin 3035 | com.apple.InterfaceBuilder.CocoaPlugin 3036 | com.apple.InterfaceBuilder.CocoaPlugin 3037 | com.apple.InterfaceBuilder.CocoaPlugin 3038 | com.apple.InterfaceBuilder.CocoaPlugin 3039 | com.apple.InterfaceBuilder.CocoaPlugin 3040 | com.apple.InterfaceBuilder.CocoaPlugin 3041 | com.apple.InterfaceBuilder.CocoaPlugin 3042 | com.apple.InterfaceBuilder.CocoaPlugin 3043 | com.apple.InterfaceBuilder.CocoaPlugin 3044 | com.apple.InterfaceBuilder.CocoaPlugin 3045 | com.apple.InterfaceBuilder.CocoaPlugin 3046 | com.apple.InterfaceBuilder.CocoaPlugin 3047 | com.apple.InterfaceBuilder.CocoaPlugin 3048 | com.apple.InterfaceBuilder.CocoaPlugin 3049 | com.apple.InterfaceBuilder.CocoaPlugin 3050 | com.apple.InterfaceBuilder.CocoaPlugin 3051 | com.apple.InterfaceBuilder.CocoaPlugin 3052 | com.apple.InterfaceBuilder.CocoaPlugin 3053 | com.apple.InterfaceBuilder.CocoaPlugin 3054 | com.apple.InterfaceBuilder.CocoaPlugin 3055 | com.apple.InterfaceBuilder.CocoaPlugin 3056 | com.apple.InterfaceBuilder.CocoaPlugin 3057 | com.apple.InterfaceBuilder.CocoaPlugin 3058 | com.apple.InterfaceBuilder.CocoaPlugin 3059 | com.apple.InterfaceBuilder.CocoaPlugin 3060 | com.apple.InterfaceBuilder.CocoaPlugin 3061 | com.apple.InterfaceBuilder.CocoaPlugin 3062 | com.apple.InterfaceBuilder.CocoaPlugin 3063 | com.apple.InterfaceBuilder.CocoaPlugin 3064 | {{380, 496}, {480, 360}} 3065 | 3066 | com.apple.InterfaceBuilder.CocoaPlugin 3067 | com.apple.InterfaceBuilder.CocoaPlugin 3068 | com.apple.InterfaceBuilder.CocoaPlugin 3069 | com.apple.InterfaceBuilder.CocoaPlugin 3070 | com.apple.InterfaceBuilder.CocoaPlugin 3071 | com.apple.InterfaceBuilder.CocoaPlugin 3072 | com.apple.InterfaceBuilder.CocoaPlugin 3073 | com.apple.InterfaceBuilder.CocoaPlugin 3074 | com.apple.InterfaceBuilder.CocoaPlugin 3075 | com.apple.InterfaceBuilder.CocoaPlugin 3076 | com.apple.InterfaceBuilder.CocoaPlugin 3077 | com.apple.InterfaceBuilder.CocoaPlugin 3078 | com.apple.InterfaceBuilder.CocoaPlugin 3079 | com.apple.InterfaceBuilder.CocoaPlugin 3080 | com.apple.InterfaceBuilder.CocoaPlugin 3081 | com.apple.InterfaceBuilder.CocoaPlugin 3082 | com.apple.InterfaceBuilder.CocoaPlugin 3083 | com.apple.InterfaceBuilder.CocoaPlugin 3084 | com.apple.InterfaceBuilder.CocoaPlugin 3085 | com.apple.InterfaceBuilder.CocoaPlugin 3086 | com.apple.InterfaceBuilder.CocoaPlugin 3087 | com.apple.InterfaceBuilder.CocoaPlugin 3088 | com.apple.InterfaceBuilder.CocoaPlugin 3089 | com.apple.InterfaceBuilder.CocoaPlugin 3090 | com.apple.InterfaceBuilder.CocoaPlugin 3091 | com.apple.InterfaceBuilder.CocoaPlugin 3092 | com.apple.InterfaceBuilder.CocoaPlugin 3093 | com.apple.InterfaceBuilder.CocoaPlugin 3094 | com.apple.InterfaceBuilder.CocoaPlugin 3095 | com.apple.InterfaceBuilder.CocoaPlugin 3096 | com.apple.InterfaceBuilder.CocoaPlugin 3097 | com.apple.InterfaceBuilder.CocoaPlugin 3098 | com.apple.InterfaceBuilder.CocoaPlugin 3099 | com.apple.InterfaceBuilder.CocoaPlugin 3100 | com.apple.InterfaceBuilder.CocoaPlugin 3101 | com.apple.InterfaceBuilder.CocoaPlugin 3102 | com.apple.InterfaceBuilder.CocoaPlugin 3103 | com.apple.InterfaceBuilder.CocoaPlugin 3104 | com.apple.InterfaceBuilder.CocoaPlugin 3105 | com.apple.InterfaceBuilder.CocoaPlugin 3106 | com.apple.InterfaceBuilder.CocoaPlugin 3107 | com.apple.InterfaceBuilder.CocoaPlugin 3108 | com.apple.InterfaceBuilder.CocoaPlugin 3109 | com.apple.InterfaceBuilder.CocoaPlugin 3110 | com.apple.InterfaceBuilder.CocoaPlugin 3111 | com.apple.InterfaceBuilder.CocoaPlugin 3112 | com.apple.InterfaceBuilder.CocoaPlugin 3113 | com.apple.InterfaceBuilder.CocoaPlugin 3114 | com.apple.InterfaceBuilder.CocoaPlugin 3115 | com.apple.InterfaceBuilder.CocoaPlugin 3116 | com.apple.InterfaceBuilder.CocoaPlugin 3117 | com.apple.InterfaceBuilder.CocoaPlugin 3118 | com.apple.InterfaceBuilder.CocoaPlugin 3119 | com.apple.InterfaceBuilder.CocoaPlugin 3120 | com.apple.InterfaceBuilder.CocoaPlugin 3121 | com.apple.InterfaceBuilder.CocoaPlugin 3122 | com.apple.InterfaceBuilder.CocoaPlugin 3123 | com.apple.InterfaceBuilder.CocoaPlugin 3124 | com.apple.InterfaceBuilder.CocoaPlugin 3125 | com.apple.InterfaceBuilder.CocoaPlugin 3126 | com.apple.InterfaceBuilder.CocoaPlugin 3127 | com.apple.InterfaceBuilder.CocoaPlugin 3128 | com.apple.InterfaceBuilder.CocoaPlugin 3129 | com.apple.InterfaceBuilder.CocoaPlugin 3130 | com.apple.InterfaceBuilder.CocoaPlugin 3131 | com.apple.InterfaceBuilder.CocoaPlugin 3132 | com.apple.InterfaceBuilder.CocoaPlugin 3133 | com.apple.InterfaceBuilder.CocoaPlugin 3134 | com.apple.InterfaceBuilder.CocoaPlugin 3135 | com.apple.InterfaceBuilder.CocoaPlugin 3136 | com.apple.InterfaceBuilder.CocoaPlugin 3137 | com.apple.InterfaceBuilder.CocoaPlugin 3138 | com.apple.InterfaceBuilder.CocoaPlugin 3139 | com.apple.InterfaceBuilder.CocoaPlugin 3140 | com.apple.InterfaceBuilder.CocoaPlugin 3141 | com.apple.InterfaceBuilder.CocoaPlugin 3142 | com.apple.InterfaceBuilder.CocoaPlugin 3143 | com.apple.InterfaceBuilder.CocoaPlugin 3144 | com.apple.InterfaceBuilder.CocoaPlugin 3145 | com.apple.InterfaceBuilder.CocoaPlugin 3146 | com.apple.InterfaceBuilder.CocoaPlugin 3147 | com.apple.InterfaceBuilder.CocoaPlugin 3148 | com.apple.InterfaceBuilder.CocoaPlugin 3149 | com.apple.InterfaceBuilder.CocoaPlugin 3150 | com.apple.InterfaceBuilder.CocoaPlugin 3151 | com.apple.InterfaceBuilder.CocoaPlugin 3152 | com.apple.InterfaceBuilder.CocoaPlugin 3153 | com.apple.InterfaceBuilder.CocoaPlugin 3154 | com.apple.InterfaceBuilder.CocoaPlugin 3155 | com.apple.InterfaceBuilder.CocoaPlugin 3156 | com.apple.InterfaceBuilder.CocoaPlugin 3157 | 3158 | 3159 | 3160 | 3161 | 3162 | 535 3163 | 3164 | 3165 | 3166 | 3167 | JBAppDelegate 3168 | NSObject 3169 | 3170 | window 3171 | NSWindow 3172 | 3173 | 3174 | window 3175 | 3176 | window 3177 | NSWindow 3178 | 3179 | 3180 | 3181 | IBProjectSource 3182 | ./Classes/JBAppDelegate.h 3183 | 3184 | 3185 | 3186 | 3187 | 0 3188 | IBCocoaFramework 3189 | YES 3190 | 3 3191 | 3192 | {11, 11} 3193 | {10, 3} 3194 | 3195 | YES 3196 | 3197 | 3198 | -------------------------------------------------------------------------------- /JBShellView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // JBShellView 4 | // 5 | // Created by Jason Brennan on 2012-11-29. 6 | // Copyright (c) 2012 Jason Brennan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | return NSApplicationMain(argc, (const char **)argv); 14 | } 15 | -------------------------------------------------------------------------------- /License.md: -------------------------------------------------------------------------------- 1 | BSD 2-Clause License 2 | 3 | Copyright (c) 2018, Jason Brennan 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 20 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | -------------------------------------------------------------------------------- /jbshellview@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jbrennan/JBShellView/5da8e1cd4adf323af13007fdfeb3ddd941590b98/jbshellview@2x.png -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | JBShellView 2 | =========== 3 | 4 | This class provides a shell or command-line interface. Some features: 5 | 6 | * Cocoa native, it's an `NSTextView` subclass 7 | * Supports command history, so you can use up and down arrows, as you'd expect 8 | * Supports auto-pairing for smarter text editing via `JBTextEditorProcessor` 9 | * Supports asynchronous operations so you don't hang the interface. 10 | 11 | Demo 12 | ---- 13 | 14 | ![Alt text](https://raw.github.com/jbrennan/JBShellView/master/jbshellview@2x.png) 15 | 16 | The demo application shows off the Shell view and lets you enter commands. The only recognized command is `search some query`, but by checking out the app you can hopefully figure out how to support different commands. It's pretty straightforward. --------------------------------------------------------------------------------