2022-12-15 04:00:54 +00:00
|
|
|
---
|
2023-08-26 15:30:51 +00:00
|
|
|
title: Module hilbish.completions
|
2022-12-15 04:00:54 +00:00
|
|
|
description: tab completions
|
|
|
|
layout: doc
|
|
|
|
menu:
|
|
|
|
docs:
|
|
|
|
parent: "API"
|
|
|
|
---
|
|
|
|
|
|
|
|
## Introduction
|
|
|
|
The completions interface deals with tab completions.
|
|
|
|
|
|
|
|
## Functions
|
2023-08-26 15:30:51 +00:00
|
|
|
### hilbish.completions.call(name, query, ctx, fields) -> completionGroups (table), prefix (string)
|
2022-12-15 04:00:54 +00:00
|
|
|
Calls a completer function. This is mainly used to call
|
|
|
|
a command completer, which will have a `name` in the form
|
2023-02-07 22:19:24 +00:00
|
|
|
of `command.name`, example: `command.git`.
|
|
|
|
You can check `doc completions` for info on the `completionGroups` return value.
|
2023-08-26 15:30:51 +00:00
|
|
|
#### Parameters
|
|
|
|
This function has no parameters.
|
2022-12-15 04:00:54 +00:00
|
|
|
|
2023-08-26 15:30:51 +00:00
|
|
|
### hilbish.completions.handler(line, pos)
|
2022-12-15 04:00:54 +00:00
|
|
|
The handler function is the callback for tab completion in Hilbish.
|
|
|
|
You can check the completions doc for more info.
|
2023-08-26 15:30:51 +00:00
|
|
|
#### Parameters
|
|
|
|
This function has no parameters.
|
2022-12-15 04:00:54 +00:00
|
|
|
|
2023-08-26 15:30:51 +00:00
|
|
|
### hilbish.completions.bins(query, ctx, fields) -> entries (table), prefix (string)
|
2022-12-15 04:00:54 +00:00
|
|
|
Returns binary/executale completion candidates based on the provided query.
|
2023-08-26 15:30:51 +00:00
|
|
|
#### Parameters
|
|
|
|
This function has no parameters.
|
2022-12-15 04:00:54 +00:00
|
|
|
|
2023-08-26 15:30:51 +00:00
|
|
|
### hilbish.completions.files(query, ctx, fields) -> entries (table), prefix (string)
|
2022-12-15 04:00:54 +00:00
|
|
|
Returns file completion candidates based on the provided query.
|
2023-08-26 15:30:51 +00:00
|
|
|
#### Parameters
|
|
|
|
This function has no parameters.
|
2022-12-15 04:00:54 +00:00
|
|
|
|