Merge pull request #4990 from eatkins/exclude-semicolons

Filter single semicolons from tab completions
This commit is contained in:
eugene yokota 2019-08-27 14:24:50 -04:00 committed by GitHub
commit c06781aa61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -89,7 +89,10 @@ object JLineCompletion {
(insert.toSeq, display.toSeq.sorted)
}
def appendNonEmpty(set: Set[String], add: String) = if (add.trim.isEmpty) set else set + add
def appendNonEmpty(set: Set[String], add: String) = {
val trimmed = add.trim
if (trimmed.isEmpty || trimmed == ";") set else set + add
}
def customCompletor(
f: (String, Int) => (Seq[String], Seq[String])