Reference

# Module `awful.completion`

Completion module. This module store a set of function using shell to complete commands name.

Authors:

Julien Danjou <julien@danjou.info>
Sébastien Gross <seb-awesome@chezwam.org>

Copyright© 2008 Julien Danjou, Sébastien Gross

Release: v3.4.13

## Functions

bashcomp_load (src) | Enable programmable bash completion in awful.completion.bash at the price of a slight overhead.
generic (text, cur_pos, ncomp, keywords) | Run a generic completion.
shell (command, cur_pos, ncomp, shell) | Use shell completion system to complete command and filename.

## Functions

bashcomp_load (src)
  Enable programmable bash completion in awful.completion.bash at the price of a slight overhead.

  ### Parameters

  - src: The bash completion source file, /etc/bash_completion by default.
generic (text, cur_pos, ncomp, keywords)
  Run a generic completion. For this function to run properly the awful.completion.keyword table should be fed up with all keywords. The completion is run against these keywords.

  ### Parameters

  - text: The current text the user had typed yet.
  - cur_pos: The current cursor position.
  - ncomp: The number of yet requested completion using current text.
  - keywords: The keywords table uised for completion.

  ### Return value:

  The new match, the new cursor position, the table of all matches.
shell (command, cur_pos, ncomp, shell)
  Use shell completion system to complete command and filename.

  ### Parameters

  - command: The command line.
  - cur_pos: The cursor position.
  - ncomp: The element number to complete.
  - shell: The shell to use for completion (bash (default) or zsh).

  ### Return value:

  The new command, the new cursor position, the table of all matches.