Issue 1:
Tab completion fails to infer field names:

julia> Pkg.dependencies()[Pkg.project().dependencies["Revise"]].┌ Error: Error in the keymap
│ exception =
│ BoundsError: attempt to access 1-element Array{Any,1} at index [2]

But it has no trouble when broken down in two steps:

julia> x = Pkg.dependencies()[Pkg.project().dependencies["Revise"]];

julia> x.
dependencies git_source is_pinned is_tracking_registry name tree_hash
git_revision is_direct_dep is_tracking_path is_tracking_repo source version

Stack trace

```
julia> Pkg.dependencies()[Pkg.project().dependencies["Revise"]].┌ Error: Error in the keymap
│ exception =
│ BoundsError: attempt to access 1-element Vector{Any} at index [2]
│ Stacktrace:
│ [1] getindex
│ @ ./array.jl:801 [inlined]
│ [2] get_value_getfield(ex::Expr, fn::Module) (repeats 2 times)
│ @ REPL.REPLCompletions /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:392
│ [3] try_get_type(sym::Expr, fn::Module)
│ @ REPL.REPLCompletions /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:436
│ [4] try_get_type(sym::Expr, fn::Module)
│ @ REPL.REPLCompletions /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:448
│ [5] get_type(sym::Expr, fn::Module)
│ @ REPL.REPLCompletions /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:457
│ [6] get_type_call(expr::Expr)
│ @ REPL.REPLCompletions /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:411
│ [7] try_get_type(sym::Expr, fn::Module)
│ @ REPL.REPLCompletions /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:439
│ [8] try_get_type(sym::Expr, fn::Module)
│ @ REPL.REPLCompletions /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:446
│ [9] get_type(sym::Expr, fn::Module)
│ @ REPL.REPLCompletions /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:457
│ [10] get_type_call(expr::Expr)
│ @ REPL.REPLCompletions /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:411
│ [11] try_get_type(sym::Expr, fn::Module)
│ @ REPL.REPLCompletions /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:439
│ [12] try_get_type(sym::Expr, fn::Module)
│ @ REPL.REPLCompletions /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:446
│ [13] get_type(sym::Expr, fn::Module)
│ @ REPL.REPLCompletions /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:457
│ [14] complete_symbol(sym::String, ffunc::REPL.REPLCompletions.var"#34#37", context_module::Module)
│ @ REPL.REPLCompletions /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:153
│ [15] completions(string::String, pos::Int64, context_module::Module)
│ @ REPL.REPLCompletions /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:774
│ [16] completions
│ @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPLCompletions.jl:638 [inlined]
│ [17] complete_line(c::REPL.REPLCompletionProvider, s::REPL.LineEdit.PromptState)
│ @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:439
│ [18] complete_line(s::REPL.LineEdit.PromptState, repeats::Int64)
│ @ REPL.LineEdit /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:348
│ [19] complete_line(s::REPL.LineEdit.MIState)
│ @ REPL.LineEdit /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:339
│ [20] edit_tab(s::REPL.LineEdit.MIState, jump_spaces::Bool, delete_trailing::Bool) (repeats 2 times)
│ @ REPL.LineEdit /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2118
│ [21] (::REPL.LineEdit.var"#109#162")(::REPL.LineEdit.MIState, ::Any, ::Vararg{Any, N} where N)
│ @ REPL.LineEdit /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2159
│ [22] #invokelatest#2
│ @ ./essentials.jl:708 [inlined]
│ [23] invokelatest
│ @ ./essentials.jl:706 [inlined]
│ [24] (::REPL.LineEdit.var"#22#23"{REPL.LineEdit.var"#109#162", String})(s::Any, p::Any)
│ @ REPL.LineEdit /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:1414
│ [25] prompt!(term::REPL.Terminals.TextTerminal, prompt::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
│ @ REPL.LineEdit /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2534
│ [26] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
│ @ REPL.LineEdit /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2436
│ [27] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
│ @ REPL /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:1126
│ [28] (::REPL.var"#44#49"{REPL.LineEditREPL, REPL.REPLBackendRef})()
│ @ REPL ./task.jl:406
└ @ REPL.LineEdit /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/REPL/src/LineEdit.jl:2536

</details>

Issue 2:
Open julia with REPL, type @nonexist. and hit Tab:

_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: https://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.7.0-DEV.5138 (2018-05-19 22:52 UTC)
_/ |\__'_|_|_|\__'_| | Commit a465d33f6 (1 day old master)
|__/ | x86_64-redhat-linux

julia> @nonexist.┌ Error: Error in the keymap
│ exception =
│ LoadError: UndefVarError: @nonexist not defined
│ Stacktrace:
│ [1] top-level scope
│ [2] lower at ./meta.jl:68 [inlined]
│ [3] get_type(::Expr, ::Module) at /TEST/usr/share/julia/stdlib/v0.7/REPL/src/REPLCompletions.jl:362
│ [4] complete_symbol(::String, ::getfield(REPL.REPLCompletions, Symbol("##15#17"))) at /TEST/usr/share/julia/stdlib/v0.7/REPL/src/REPLCompletions.jl:63
│ [5] completions(::String, ::Int64) at /TEST/usr/share/julia/stdlib/v0.7/REPL/src/REPLCompletions.jl:648
...