# How does autocompletion work in pkg mode?

**URL:** <https://discourse.julialang.org/t/how-does-autocompletion-work-in-pkg-mode/127435>\
**Category:** General Usage\
**Created:** [March 28, 2025, 12:30am UTC](https://discourse.julialang.org/t/how-does-autocompletion-work-in-pkg-mode/127435 "2025-03-28T00:30:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthias314](https://avatars.discourse-cdn.com/v4/letter/m/a88e4f/32.png) [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Post date:** [March 28, 2025, 12:30am UTC](https://discourse.julialang.org/t/how-does-autocompletion-work-in-pkg-mode/127435/1 "2025-03-28T00:30:50Z")

</div>

I’m confused by the autocompletion in REPL package manager mode: If I type

```julia
pkg> add Static

```

then this completed (in gray) to “add StaticArrays”. However, if I hit `TAB`, then the completion disappears, presumably because there are other possible choices (that are displayed if I hit `TAB` again). How can I accept the autocompleted suggestion?

---

<div class="post-metadata">

**Author:** ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Post date:** [March 28, 2025, 8:01am UTC](https://discourse.julialang.org/t/how-does-autocompletion-work-in-pkg-mode/127435/2 "2025-03-28T08:01:53Z")

</div>

Oh that might be a bit unfortunate. If you hit twice you see the full list of 31 packages starting with `Static` and if you hit A and then TAB it autocompletes to `StaticArray`.

So maybe the array hint is a bit (one key) early actually?

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [March 28, 2025, 8:42am UTC](https://discourse.julialang.org/t/how-does-autocompletion-work-in-pkg-mode/127435/3 "2025-03-28T08:42:00Z")

</div>

I think this is a bug - while the feature was called “hinting” in the 1.11 release announcement here:

> **[Julia 1.11 Highlights](https://julialang.org/blog/2024/10/julia-1.11-highlights/#improved_tab_completion_and_hinting_in_the_repl)**
>
> Highlights of the Julia 1.11 release.

the description says it should be “hinting when there’s a singular completion available”. Checking quickly for two of my packages this works (e.g. `add Synth` will not offer a hint, but `add SynthC` will offer `SynthControl` and tab to autocomplete works), but it seems to go wrong in other cases.

Maybe @ianshmean can chime in.

---

<div class="post-metadata">

**Author:** ![matthias314](https://avatars.discourse-cdn.com/v4/letter/m/a88e4f/32.png) [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Post date:** [March 28, 2025, 11:21am UTC](https://discourse.julialang.org/t/how-does-autocompletion-work-in-pkg-mode/127435/4 "2025-03-28T11:21:17Z")

</div>

> [@kellertuer](#):
>
> So maybe the array hint is a bit (one key) early actually?

It’s more than that. `StaticA` + `TAB` autocompletes to `StaticArray`, but not to the suggested `StaticArrays` because there are still three other possible choices.

---

<div class="post-metadata">

**Author:** ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Post date:** [March 28, 2025, 12:18pm UTC](https://discourse.julialang.org/t/how-does-autocompletion-work-in-pkg-mode/127435/5 "2025-03-28T12:18:52Z")

</div>

Ah yes, because at that point there are still 4 choices of actual packages left. Then the suggestion is maybe just the most likely one? Still a bit strange.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [March 28, 2025, 12:31pm UTC](https://discourse.julialang.org/t/how-does-autocompletion-work-in-pkg-mode/127435/6 "2025-03-28T12:31:36Z")

</div>

It shouldn’t inline the StaticArrays completion after just writing Static. That’s buggy.

---

<div class="post-metadata">

**Author:** ![matthias314](https://avatars.discourse-cdn.com/v4/letter/m/a88e4f/32.png) [@matthias314](https://discourse.julialang.org/u/matthias314)\
**Post date:** [March 28, 2025, 9:29pm UTC](https://discourse.julialang.org/t/how-does-autocompletion-work-in-pkg-mode/127435/7 "2025-03-28T21:29:18Z")

</div>

I’ve posted an [issue](https://github.com/JuliaLang/julia/issues/57930) on GitHub.
