rzimmerman / kal

A powerful, easy-to-use, and easy-to-read programming language for the future.
http://rzimmerman.github.io/kal
MIT License
394 stars 18 forks source link

Triggering autocomplete in OSX terminal causes crash #75

Closed ecod3r closed 11 years ago

ecod3r commented 11 years ago

Here is the stack trace of pressing tab on a blank input line. Similar errors can be obtained when the line contains undefined/invalid elements.

TypeError: Cannot read property 'keywords' of undefined at completeVariable (/usr/local/lib/node_modules/kal/compiled/interactive.js:1:1162) at autocomplete (/usr/local/lib/node_modules/kal/compiled/interactive.js:1:206) at Interface.completer (readline.js:83:20) at Interface._tabComplete (readline.js:359:8) at Interface._ttyWrite (readline.js:779:14) at ReadStream.onkeypress (readline.js:99:10) at ReadStream.EventEmitter.emit (events.js:117:20) at emitKey (readline.js:1095:12) at ReadStream.onData (readline.js:840:14) at ReadStream.EventEmitter.emit (events.js:95:17)

rzimmerman commented 11 years ago

I copied most of the REPL from CoffeeScript and I don't think I tested this feature, so I'm not surprised it doesn't work. Thanks for filing the bug.

I don't think this is OS X specific.