Skip to content

Commit

Permalink
Fixed TEMP|TEMPORARY keyword autocompletion
Browse files Browse the repository at this point in the history
  • Loading branch information
jgryko5 authored and nineinchnick committed Aug 2, 2021
1 parent ae8d47e commit d2c70ea
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/completer/completer.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,12 @@ func (c completer) complete(previousWords []string, text []rune) [][]rune {
/* XXX: implement tab completion for DELETE ... USING */

/* Complete CREATE */
if tailMatches(IGNORE_CASE, previousWords, "CREATE") || tailMatches(IGNORE_CASE, previousWords, "CREATE", "TEMP|TEMPORARY") {
if tailMatches(IGNORE_CASE, previousWords, "CREATE") {
return completeFromList(text, "DATABASE", "SEQUENCE", "TABLE", "VIEW", "TEMPORARY")
}
if tailMatches(IGNORE_CASE, previousWords, "CREATE", "TEMP|TEMPORARY") {
return completeFromList(text, "TABLE", "VIEW")
}
if tailMatches(IGNORE_CASE, previousWords, "CREATE", "TABLE", "*") || tailMatches(IGNORE_CASE, previousWords, "CREATE", "TEMP|TEMPORARY", "TABLE", "*") {
return completeFromList(text, "(")
}
Expand Down

0 comments on commit d2c70ea

Please sign in to comment.