 	}
 }*/
 
-if prefix != nil || filePath != nil {
+if showAllWords { // --all
+	solution = allWords
+} else if prefix != nil || filePath != nil { // --prefix and/or --file
 	solution = allWords.filter() { word -> Bool in
 		if prefix != nil && !word.bridgeToObjectiveC().hasPrefix(prefix) {
 			return false
 		}
 
 		// Never runs, is disabled
-		if fileWords != nil && JOUtil.isFound(JOUtil.binarySearchArray(fileWords, forObject:word)) {
+		if fileWords != nil && !JOUtil.isFound(JOUtil.binarySearchArray(fileWords, forObject:word)) {
 			return false
 		}
 

let parser = GBCommandLineParser()
parser.registerOption("prefix", shortcut: 112 /* p */, requirement: GBValueRequired)
//parser.registerOption("file", shortcut: 102 /* f */, requirement: GBValueRequired)

var options = Dictionary<String, AnyObject>()
var lines = Array<String>()


parser.parseOptionsUsingDefaultArgumentsWithBlock(_parseOption)

if lines.count <= 1 {
	println("Error: you must give a puzzle to solve!")
	exit(2)
}

println("Solving puzzle:")
for line in lines {
	println(" \(line)")
