diff --git a/cmd/geth/js.go b/cmd/geth/js.go index c31deefdd..3e3600705 100644 --- a/cmd/geth/js.go +++ b/cmd/geth/js.go @@ -121,7 +121,7 @@ func keywordCompleter(line string) []string { } func apiWordCompleter(line string, pos int) (head string, completions []string, tail string) { - if len(line) == 0 { + if len(line) == 0 || pos == 0 { return "", nil, "" }