aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2018-10-10 19:49:17 +0200
committerPřemysl Janouch <p@janouch.name>2018-10-10 19:56:05 +0200
commit563e8ba06913f0c6a7df42e1c379162f902f9570 (patch)
treecbc43125e54ef8eeaa84313b19924d71c52c7928 /cmd
parentb210216c711de9043964313662677dff513fde1d (diff)
downloadell-563e8ba06913f0c6a7df42e1c379162f902f9570.tar.gz
ell-563e8ba06913f0c6a7df42e1c379162f902f9570.tar.xz
ell-563e8ba06913f0c6a7df42e1c379162f902f9570.zip
Go: store scopes and globals as maps
Diffstat (limited to 'cmd')
-rw-r--r--cmd/repl/main.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd/repl/main.go b/cmd/repl/main.go
index 098452d..b1bb413 100644
--- a/cmd/repl/main.go
+++ b/cmd/repl/main.go
@@ -48,8 +48,7 @@ func complete(L *ell.Ell, line string, pos int) (
head, line = line[:lastSpace+1], line[lastSpace+1:]
}
- for _, v := range L.Globals {
- name := v.List[0].String
+ for name := range L.Globals {
if strings.HasPrefix(strings.ToLower(name), line) {
completions = append(completions, name)
}