# Is there any way to stop showing leaf-list in possible completion

**URL:** https://dmap-community.ductus.global/t/is-there-any-way-to-stop-showing-leaf-list-in-possible-completion/2634
**Category:** YANG
**Created:** [August 13, 2019, 12:00am UTC](https://dmap-community.ductus.global/t/is-there-any-way-to-stop-showing-leaf-list-in-possible-completion/2634 "2019-08-13T00:00:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mariel](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@mariel](https://dmap-community.ductus.global/u/mariel)
#### Post date: [August 13, 2019, 12:00am UTC](https://dmap-community.ductus.global/t/is-there-any-way-to-stop-showing-leaf-list-in-possible-completion/2634/1 "2019-08-13T00:00:21Z")

</div>

I have an action in yang, and inside it, I have a leaf-list, for example:

container testLeaflistAction {  
tailf:action testAction {  
tailf:actionpoint test-action;  
input {  
leaf-list elements {  
tailf:info “elements”;  
type string;  
}  
The leaf-list should have multiple elements, so not consider min-elements or max-elements.  
When user type "request action testAction elements […] ", and then they press tab, still have leaf-list elements in the possible completion list in terminal. Is there any way to fix that, so after first time user tab elements leaf-list, then tab again, then there’s no leaf-list in possible completion any more.

---

<div class="post-metadata">

### Author: ![cohult](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/cohult/32/221_2.png) [@cohult](https://dmap-community.ductus.global/u/cohult)
#### Post date: [August 14, 2019, 8:19am UTC](https://dmap-community.ductus.global/t/is-there-any-way-to-stop-showing-leaf-list-in-possible-completion/2634/2 "2019-08-14T08:19:33Z")

</div>

I am not sure I understand what behaviour you want from the tab complete here. Some example would be helpful I believe.

But one way to customize the tab completion is to for example use the “tailf:cli-completion-actionpoint” extension. See the tailf\_yang\_cli\_extensions(5) man page for more details.

For some example implementations, see  
examples.confd/cli/climods  
examples.confd/linuxcfg/ietf\_interfaces and examples.confd/linuxcfg/ietf\_system

---

<div class="post-metadata">

### Author: ![mariel](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@mariel](https://dmap-community.ductus.global/u/mariel)
#### Post date: [August 15, 2019, 4:56pm UTC](https://dmap-community.ductus.global/t/is-there-any-way-to-stop-showing-leaf-list-in-possible-completion/2634/3 "2019-08-15T16:56:06Z")

</div>

Hi Conhult, thank you for your reply.  
for example, I have an action like:  
container testLeaflistAction {  
tailf:action testAction {  
tailf:actionpoint test-action;  
input {  
leaf-list elements {  
tailf:info “elements”;  
type string;  
}  
In terminal I type “request action testAction”, then I press “tab”, the possible completion will showing up in terminal that have elements which type is leaf-list, then I choose “elements” from the possible completion, then I give elements [value1, value2], then if I press “tab” again, in possible completion will still have elements.  
To fix that, I can set min-elements and max-elements of leaf-list “elements” to 1, then fix,  
but now in my case, I need more that one elements in leaf-list, I cannot do that.  
And also for tailf:cli-completion-actionpoint", if I set it into leaf-list elements, it allowed, but it will controlled the “possible completion” inside leaf-list not the action input “possible completion”.  
So I need to put tailf:cli-completion-actionpoint in the action testAction, but after I check the document, the tailf:cli-completion-actionpoint only work for leaf, leaf-list, etc, for action, there’s no way to use that.  
my question is how to access the “possible completion” of tailf:action input. Can you give me an example, thank you.
