# Why Tab in session requires pressing more than once

**URL:** <https://discourse.julialang.org/t/why-tab-in-session-requires-pressing-more-than-once/31546>\
**Category:** General Usage\
**Created:** [November 26, 2019, 8:02pm UTC](https://discourse.julialang.org/t/why-tab-in-session-requires-pressing-more-than-once/31546 "2019-11-26T20:02:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Usor](https://avatars.discourse-cdn.com/v4/letter/u/8dc957/32.png) [@Usor](https://discourse.julialang.org/u/Usor)\
**Post date:** [November 26, 2019, 8:02pm UTC](https://discourse.julialang.org/t/why-tab-in-session-requires-pressing-more-than-once/31546/1 "2019-11-26T20:02:25Z")

</div>

If using Tab to complete or suggest something, often it is required to do so more than once. Why?

How can it be fixed?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [November 27, 2019, 7:41am UTC](https://discourse.julialang.org/t/why-tab-in-session-requires-pressing-more-than-once/31546/2 "2019-11-27T07:41:14Z")

</div>

My understanding is that you need two TABs when there are multiple possible completions. eg one TAB completes `\alph` to `α`, but after `\a` you need two to see the list of possibilities.

I think of it as a feature, not a bug.

---

<div class="post-metadata">

**Author:** ![Usor](https://avatars.discourse-cdn.com/v4/letter/u/8dc957/32.png) [@Usor](https://discourse.julialang.org/u/Usor)\
**Post date:** [November 27, 2019, 6:25pm UTC](https://discourse.julialang.org/t/why-tab-in-session-requires-pressing-more-than-once/31546/3 "2019-11-27T18:25:30Z")

</div>

Hmmmm, I was under the impression that one `Tab` would immediately complete if only one possibility was found, and that one `Tab` would also give all relevant possibilities if more than one was found (which seemed very obvious to me).

If it is a feature, why is it like that?

I can imagine that it might be good in some cases.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [November 28, 2019, 6:40am UTC](https://discourse.julialang.org/t/why-tab-in-session-requires-pressing-more-than-once/31546/4 "2019-11-28T06:40:59Z")

</div>

I don’t know the history of this feature. Personally, I like it because it gives me an opportunity to add other characters to pin down the symbol name before cluttering the console.

Cf completion in most shells (eg bash/zsh), which AFAICT does this for the _first_ tab (though I am sure that zsh can be configured to do what Julia does, but never bothered).

In any case, if this is important to you, check if there is an existing issue and maybe open one. I guess that getting completions after the first tab is a valid preference.

---

<div class="post-metadata">

**Author:** ![Usor](https://avatars.discourse-cdn.com/v4/letter/u/8dc957/32.png) [@Usor](https://discourse.julialang.org/u/Usor)\
**Post date:** [November 28, 2019, 2:18pm UTC](https://discourse.julialang.org/t/why-tab-in-session-requires-pressing-more-than-once/31546/5 "2019-11-28T14:18:06Z")

</div>

Yes, I also thought of the possibility of not cluttering the screen. It seems like a good thing.

I think I will leave it for now.

I did notice that sometimes it took long before Tab completion even did anything at all. It sometimes took long before the session was noticeably active again and usable by direct user activity. Does it have to do with compilation or anything like that, or not? It doesn’t always happen.

---

<div class="post-metadata">

**Author:** ![kevbonham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kevbonham/32/216165_2.png) [@kevbonham](https://discourse.julialang.org/u/kevbonham)\
**Post date:** [November 28, 2019, 7:45pm UTC](https://discourse.julialang.org/t/why-tab-in-session-requires-pressing-more-than-once/31546/6 "2019-11-28T19:45:22Z")

</div>

> [@Tamas\_Papp](#):
>
> My understanding is that you need two TABs when there are multiple possible completions. eg one TAB completes `\alph` to `α` , but after `\a` you need two to see the list of possibilities.

The way I think of it is, “one tab to complete as far as possible, two to see possible completions.” Usually, if you have eg `my_variable1` and `my_variable2`, then type `my_v<tab>`, it will autocomplete to `my_variable`. Then you press it again to see the options. When the very next character is ambiguous, one tab still does the same thing - it completes as far as it’s able, which is no further.
